diff --git a/CHANGELOG.md b/CHANGELOG.md
index 40a6336a..7eb4f96a 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,6 +1,11 @@
+## v3.1.0 (2021-01-30)
+
+- Make `Pane` component compatible with React's `StrictMode` ([PR #810](https://github.com/PaulLeCam/react-leaflet/pull/810) by [zmbc](https://github.com/zmbc))
+- Fix typo in API Components docs ([PR #827](https://github.com/PaulLeCam/react-leaflet/pull/827) by [arthurdenner](https://github.com/arthurdenner))
+
## v3.0.5 (2020-12-20)
-Use `useState` hook rather than `useMemo` to store immutable values in `MapContainer` and `Pane`.
+Use `useState` hook rather than `useMemo` to store immutable values in `MapContainer` and `Pane`
## v3.0.4 (2020-12-13)
diff --git a/package.json b/package.json
index b957c927..9d612577 100644
--- a/package.json
+++ b/package.json
@@ -35,8 +35,8 @@
"@types/react": "^17.0.0",
"@types/react-dom": "^17.0.0",
"@types/warning": "^3.0.0",
- "@typescript-eslint/eslint-plugin": "^4.14.0",
- "@typescript-eslint/parser": "^4.14.0",
+ "@typescript-eslint/eslint-plugin": "^4.14.1",
+ "@typescript-eslint/parser": "^4.14.1",
"babel-eslint": "^10.0.3",
"babel-jest": "^26.6.1",
"cross-env": "^7.0.3",
diff --git a/packages/react-leaflet/__tests__/Pane.tsx b/packages/react-leaflet/__tests__/Pane.tsx
index 0ceda2be..1a5b3f68 100644
--- a/packages/react-leaflet/__tests__/Pane.tsx
+++ b/packages/react-leaflet/__tests__/Pane.tsx
@@ -34,9 +34,15 @@ describe('Pane', () => {
-
+
-
+
,
@@ -49,29 +55,38 @@ describe('Pane', () => {
-
+
-
+
,
)
expect(container).toMatchSnapshot()
- rerender(
-
- ,
- )
+ rerender()
expect(container).toMatchSnapshot()
rerender(
-
+
-
+
-
+ ,
)
expect(container).toMatchSnapshot()
})
diff --git a/packages/react-leaflet/package.json b/packages/react-leaflet/package.json
index 4ada4ad6..6f179161 100644
--- a/packages/react-leaflet/package.json
+++ b/packages/react-leaflet/package.json
@@ -1,6 +1,6 @@
{
"name": "react-leaflet",
- "version": "3.0.5",
+ "version": "3.1.0",
"description": "React components for Leaflet maps",
"main": "cjs/index.js",
"module": "esm/index.js",
@@ -51,11 +51,11 @@
"react-dom": "^17.0.1"
},
"devDependencies": {
- "@rollup/plugin-babel": "^5.2.0",
- "@rollup/plugin-commonjs": "^17.0.0",
- "@rollup/plugin-node-resolve": "^11.1.0",
+ "@rollup/plugin-babel": "^5.2.3",
+ "@rollup/plugin-commonjs": "^17.1.0",
+ "@rollup/plugin-node-resolve": "^11.1.1",
"@rollup/plugin-replace": "^2.3.4",
- "rollup": "^2.38.0",
+ "rollup": "^2.38.1",
"rollup-plugin-terser": "^7.0.0"
}
}
diff --git a/packages/react-leaflet/src/Pane.tsx b/packages/react-leaflet/src/Pane.tsx
index bc13bc63..1bef41e4 100644
--- a/packages/react-leaflet/src/Pane.tsx
+++ b/packages/react-leaflet/src/Pane.tsx
@@ -73,7 +73,9 @@ function createPane(
export function Pane(props: PaneProps) {
const [paneElement, setPaneElement] = useState()
const context = useLeafletContext()
- const newContext = useMemo(() => ({ ...context, pane: props.name }), [context])
+ const newContext = useMemo(() => ({ ...context, pane: props.name }), [
+ context,
+ ])
useEffect(() => {
setPaneElement(createPane(props, context))
diff --git a/yarn.lock b/yarn.lock
index 239f2288..6e985930 100644
--- a/yarn.lock
+++ b/yarn.lock
@@ -1967,18 +1967,18 @@
os-homedir "^1.0.1"
regexpu-core "^4.5.4"
-"@rollup/plugin-babel@^5.2.0":
- version "5.2.2"
- resolved "https://registry.yarnpkg.com/@rollup/plugin-babel/-/plugin-babel-5.2.2.tgz#e5623a01dd8e37e004ba87f2de218c611727d9b2"
- integrity sha512-MjmH7GvFT4TW8xFdIeFS3wqIX646y5tACdxkTO+khbHvS3ZcVJL6vkAHLw2wqPmkhwCfWHoNsp15VYNwW6JEJA==
+"@rollup/plugin-babel@^5.2.3":
+ version "5.2.3"
+ resolved "https://registry.yarnpkg.com/@rollup/plugin-babel/-/plugin-babel-5.2.3.tgz#ee8fffbaa62a6c9ccd41b1bfca32e81f847700ee"
+ integrity sha512-DOMc7nx6y5xFi86AotrFssQqCen6CxYn+zts5KSI879d4n1hggSb4TH3mjVgG17Vc3lZziWWfcXzrEmVdzPMdw==
dependencies:
"@babel/helper-module-imports" "^7.10.4"
"@rollup/pluginutils" "^3.1.0"
-"@rollup/plugin-commonjs@^17.0.0":
- version "17.0.0"
- resolved "https://registry.yarnpkg.com/@rollup/plugin-commonjs/-/plugin-commonjs-17.0.0.tgz#2ae2228354cf0fbba6cf9f06f30b2c66a974324c"
- integrity sha512-/omBIJG1nHQc+bgkYDuLpb/V08QyutP9amOrJRUSlYJZP+b/68gM//D8sxJe3Yry2QnYIr3QjR3x4AlxJEN3GA==
+"@rollup/plugin-commonjs@^17.1.0":
+ version "17.1.0"
+ resolved "https://registry.yarnpkg.com/@rollup/plugin-commonjs/-/plugin-commonjs-17.1.0.tgz#757ec88737dffa8aa913eb392fade2e45aef2a2d"
+ integrity sha512-PoMdXCw0ZyvjpCMT5aV4nkL0QywxP29sODQsSGeDpr/oI49Qq9tRtAsb/LbYbDzFlOydVEqHmmZWFtXJEAX9ew==
dependencies:
"@rollup/pluginutils" "^3.1.0"
commondir "^1.0.1"
@@ -1988,10 +1988,10 @@
magic-string "^0.25.7"
resolve "^1.17.0"
-"@rollup/plugin-node-resolve@^11.1.0":
- version "11.1.0"
- resolved "https://registry.yarnpkg.com/@rollup/plugin-node-resolve/-/plugin-node-resolve-11.1.0.tgz#fa0f888297b3aebcd6534e8aba4e6fe01997649a"
- integrity sha512-ouBBppRdWJKCllDXGzJ7ZIkYbaq+5TmyP0smt1vdJCFfoZhLi31vhpmjLhyo8lreHf4RoeSNllaWrvSqHpHRog==
+"@rollup/plugin-node-resolve@^11.1.1":
+ version "11.1.1"
+ resolved "https://registry.yarnpkg.com/@rollup/plugin-node-resolve/-/plugin-node-resolve-11.1.1.tgz#47bc34252914794a1b06fb50371d7520a03f91f3"
+ integrity sha512-zlBXR4eRS+2m79TsUZWhsd0slrHUYdRx4JF+aVQm+MI0wsKdlpC2vlDVjmlGvtZY1vsefOT9w3JxvmWSBei+Lg==
dependencies:
"@rollup/pluginutils" "^3.1.0"
"@types/resolve" "1.17.1"
@@ -2484,13 +2484,13 @@
dependencies:
"@types/yargs-parser" "*"
-"@typescript-eslint/eslint-plugin@^4.14.0":
- version "4.14.0"
- resolved "https://registry.yarnpkg.com/@typescript-eslint/eslint-plugin/-/eslint-plugin-4.14.0.tgz#92db8e7c357ed7d69632d6843ca70b71be3a721d"
- integrity sha512-IJ5e2W7uFNfg4qh9eHkHRUCbgZ8VKtGwD07kannJvM5t/GU8P8+24NX8gi3Hf5jST5oWPY8kyV1s/WtfiZ4+Ww==
+"@typescript-eslint/eslint-plugin@^4.14.1":
+ version "4.14.1"
+ resolved "https://registry.yarnpkg.com/@typescript-eslint/eslint-plugin/-/eslint-plugin-4.14.1.tgz#22dd301ce228aaab3416b14ead10b1db3e7d3180"
+ integrity sha512-5JriGbYhtqMS1kRcZTQxndz1lKMwwEXKbwZbkUZNnp6MJX0+OVXnG0kOlBZP4LUAxEyzu3cs+EXd/97MJXsGfw==
dependencies:
- "@typescript-eslint/experimental-utils" "4.14.0"
- "@typescript-eslint/scope-manager" "4.14.0"
+ "@typescript-eslint/experimental-utils" "4.14.1"
+ "@typescript-eslint/scope-manager" "4.14.1"
debug "^4.1.1"
functional-red-black-tree "^1.0.1"
lodash "^4.17.15"
@@ -2509,15 +2509,15 @@
eslint-scope "^5.0.0"
eslint-utils "^2.0.0"
-"@typescript-eslint/experimental-utils@4.14.0":
- version "4.14.0"
- resolved "https://registry.yarnpkg.com/@typescript-eslint/experimental-utils/-/experimental-utils-4.14.0.tgz#5aa7b006736634f588a69ee343ca959cd09988df"
- integrity sha512-6i6eAoiPlXMKRbXzvoQD5Yn9L7k9ezzGRvzC/x1V3650rUk3c3AOjQyGYyF9BDxQQDK2ElmKOZRD0CbtdkMzQQ==
+"@typescript-eslint/experimental-utils@4.14.1":
+ version "4.14.1"
+ resolved "https://registry.yarnpkg.com/@typescript-eslint/experimental-utils/-/experimental-utils-4.14.1.tgz#a5c945cb24dabb96747180e1cfc8487f8066f471"
+ integrity sha512-2CuHWOJwvpw0LofbyG5gvYjEyoJeSvVH2PnfUQSn0KQr4v8Dql2pr43ohmx4fdPQ/eVoTSFjTi/bsGEXl/zUUQ==
dependencies:
"@types/json-schema" "^7.0.3"
- "@typescript-eslint/scope-manager" "4.14.0"
- "@typescript-eslint/types" "4.14.0"
- "@typescript-eslint/typescript-estree" "4.14.0"
+ "@typescript-eslint/scope-manager" "4.14.1"
+ "@typescript-eslint/types" "4.14.1"
+ "@typescript-eslint/typescript-estree" "4.14.1"
eslint-scope "^5.0.0"
eslint-utils "^2.0.0"
@@ -2532,33 +2532,33 @@
"@typescript-eslint/typescript-estree" "3.10.1"
eslint-visitor-keys "^1.1.0"
-"@typescript-eslint/parser@^4.14.0":
- version "4.14.0"
- resolved "https://registry.yarnpkg.com/@typescript-eslint/parser/-/parser-4.14.0.tgz#62d4cd2079d5c06683e9bfb200c758f292c4dee7"
- integrity sha512-sUDeuCjBU+ZF3Lzw0hphTyScmDDJ5QVkyE21pRoBo8iDl7WBtVFS+WDN3blY1CH3SBt7EmYCw6wfmJjF0l/uYg==
+"@typescript-eslint/parser@^4.14.1":
+ version "4.14.1"
+ resolved "https://registry.yarnpkg.com/@typescript-eslint/parser/-/parser-4.14.1.tgz#3bd6c24710cd557d8446625284bcc9c6d52817c6"
+ integrity sha512-mL3+gU18g9JPsHZuKMZ8Z0Ss9YP1S5xYZ7n68Z98GnPq02pYNQuRXL85b9GYhl6jpdvUc45Km7hAl71vybjUmw==
dependencies:
- "@typescript-eslint/scope-manager" "4.14.0"
- "@typescript-eslint/types" "4.14.0"
- "@typescript-eslint/typescript-estree" "4.14.0"
+ "@typescript-eslint/scope-manager" "4.14.1"
+ "@typescript-eslint/types" "4.14.1"
+ "@typescript-eslint/typescript-estree" "4.14.1"
debug "^4.1.1"
-"@typescript-eslint/scope-manager@4.14.0":
- version "4.14.0"
- resolved "https://registry.yarnpkg.com/@typescript-eslint/scope-manager/-/scope-manager-4.14.0.tgz#55a4743095d684e1f7b7180c4bac2a0a3727f517"
- integrity sha512-/J+LlRMdbPh4RdL4hfP1eCwHN5bAhFAGOTsvE6SxsrM/47XQiPSgF5MDgLyp/i9kbZV9Lx80DW0OpPkzL+uf8Q==
+"@typescript-eslint/scope-manager@4.14.1":
+ version "4.14.1"
+ resolved "https://registry.yarnpkg.com/@typescript-eslint/scope-manager/-/scope-manager-4.14.1.tgz#8444534254c6f370e9aa974f035ced7fe713ce02"
+ integrity sha512-F4bjJcSqXqHnC9JGUlnqSa3fC2YH5zTtmACS1Hk+WX/nFB0guuynVK5ev35D4XZbdKjulXBAQMyRr216kmxghw==
dependencies:
- "@typescript-eslint/types" "4.14.0"
- "@typescript-eslint/visitor-keys" "4.14.0"
+ "@typescript-eslint/types" "4.14.1"
+ "@typescript-eslint/visitor-keys" "4.14.1"
"@typescript-eslint/types@3.10.1":
version "3.10.1"
resolved "https://registry.yarnpkg.com/@typescript-eslint/types/-/types-3.10.1.tgz#1d7463fa7c32d8a23ab508a803ca2fe26e758727"
integrity sha512-+3+FCUJIahE9q0lDi1WleYzjCwJs5hIsbugIgnbB+dSCYUxl8L6PwmsyOPFZde2hc1DlTo/xnkOgiTLSyAbHiQ==
-"@typescript-eslint/types@4.14.0":
- version "4.14.0"
- resolved "https://registry.yarnpkg.com/@typescript-eslint/types/-/types-4.14.0.tgz#d8a8202d9b58831d6fd9cee2ba12f8a5a5dd44b6"
- integrity sha512-VsQE4VvpldHrTFuVPY1ZnHn/Txw6cZGjL48e+iBxTi2ksa9DmebKjAeFmTVAYoSkTk7gjA7UqJ7pIsyifTsI4A==
+"@typescript-eslint/types@4.14.1":
+ version "4.14.1"
+ resolved "https://registry.yarnpkg.com/@typescript-eslint/types/-/types-4.14.1.tgz#b3d2eb91dafd0fd8b3fce7c61512ac66bd0364aa"
+ integrity sha512-SkhzHdI/AllAgQSxXM89XwS1Tkic7csPdndUuTKabEwRcEfR8uQ/iPA3Dgio1rqsV3jtqZhY0QQni8rLswJM2w==
"@typescript-eslint/typescript-estree@3.10.1":
version "3.10.1"
@@ -2574,13 +2574,13 @@
semver "^7.3.2"
tsutils "^3.17.1"
-"@typescript-eslint/typescript-estree@4.14.0":
- version "4.14.0"
- resolved "https://registry.yarnpkg.com/@typescript-eslint/typescript-estree/-/typescript-estree-4.14.0.tgz#4bcd67486e9acafc3d0c982b23a9ab8ac8911ed7"
- integrity sha512-wRjZ5qLao+bvS2F7pX4qi2oLcOONIB+ru8RGBieDptq/SudYwshveORwCVU4/yMAd4GK7Fsf8Uq1tjV838erag==
+"@typescript-eslint/typescript-estree@4.14.1":
+ version "4.14.1"
+ resolved "https://registry.yarnpkg.com/@typescript-eslint/typescript-estree/-/typescript-estree-4.14.1.tgz#20d3b8c8e3cdc8f764bdd5e5b0606dd83da6075b"
+ integrity sha512-M8+7MbzKC1PvJIA8kR2sSBnex8bsR5auatLCnVlNTJczmJgqRn8M+sAlQfkEq7M4IY3WmaNJ+LJjPVRrREVSHQ==
dependencies:
- "@typescript-eslint/types" "4.14.0"
- "@typescript-eslint/visitor-keys" "4.14.0"
+ "@typescript-eslint/types" "4.14.1"
+ "@typescript-eslint/visitor-keys" "4.14.1"
debug "^4.1.1"
globby "^11.0.1"
is-glob "^4.0.1"
@@ -2595,12 +2595,12 @@
dependencies:
eslint-visitor-keys "^1.1.0"
-"@typescript-eslint/visitor-keys@4.14.0":
- version "4.14.0"
- resolved "https://registry.yarnpkg.com/@typescript-eslint/visitor-keys/-/visitor-keys-4.14.0.tgz#b1090d9d2955b044b2ea2904a22496849acbdf54"
- integrity sha512-MeHHzUyRI50DuiPgV9+LxcM52FCJFYjJiWHtXlbyC27b80mfOwKeiKI+MHOTEpcpfmoPFm/vvQS88bYIx6PZTA==
+"@typescript-eslint/visitor-keys@4.14.1":
+ version "4.14.1"
+ resolved "https://registry.yarnpkg.com/@typescript-eslint/visitor-keys/-/visitor-keys-4.14.1.tgz#e93c2ff27f47ee477a929b970ca89d60a117da91"
+ integrity sha512-TAblbDXOI7bd0C/9PE1G+AFo7R5uc+ty1ArDoxmrC1ah61Hn6shURKy7gLdRb1qKJmjHkqu5Oq+e4Kt0jwf1IA==
dependencies:
- "@typescript-eslint/types" "4.14.0"
+ "@typescript-eslint/types" "4.14.1"
eslint-visitor-keys "^2.0.0"
"@webassemblyjs/ast@1.9.0":
@@ -11447,10 +11447,10 @@ rollup-plugin-terser@^7.0.0:
serialize-javascript "^4.0.0"
terser "^5.0.0"
-rollup@^2.38.0:
- version "2.38.0"
- resolved "https://registry.yarnpkg.com/rollup/-/rollup-2.38.0.tgz#57942d5a10826cb12ed1f19c261f774efa502d2d"
- integrity sha512-ay9zDiNitZK/LNE/EM2+v5CZ7drkB2xyDljvb1fQJCGnq43ZWRkhxN145oV8GmoW1YNi4sA/1Jdkr2LfawJoXw==
+rollup@^2.38.1:
+ version "2.38.1"
+ resolved "https://registry.yarnpkg.com/rollup/-/rollup-2.38.1.tgz#ecea0f7ce6ef2c1f023fdb79524eb7aeb670ea79"
+ integrity sha512-q07T6vU/V1kqM8rGRRyCgEvIQcIAXoKIE5CpkYAlHhfiWM1Iuh4dIPWpIbqFngCK6lwAB2aYHiUVhIbSWHQWhw==
optionalDependencies:
fsevents "~2.1.2"