Skip to content

Commit

Permalink
Merge pull request #10 from TurtIeSocks/remove-use-deep-effect
Browse files Browse the repository at this point in the history
refactor: remove use-deep-compare-effect
  • Loading branch information
TurtIeSocks authored Aug 29, 2023
2 parents e3894a7 + 9af67a0 commit 7376f0b
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 32 deletions.
7 changes: 2 additions & 5 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "react-leaflet-geoman-v2",
"version": "1.0.0",
"version": "1.0.1",
"description": "React wrapper for the leaflet-geoman plugin",
"repository": "https://github.com/TurtIeSocks/react-leaflet-geoman",
"author": "TurtIeSocks <58572875+TurtIeSocks@users.noreply.github.com>",
Expand All @@ -16,9 +16,6 @@
"build": "vite build",
"build:ts": "tsc --project tsconfig.build.json"
},
"dependencies": {
"use-deep-compare-effect": "^1.8.1"
},
"devDependencies": {
"@geoman-io/leaflet-geoman-free": "^2.14.2",
"@rollup/plugin-typescript": "^8.4.0",
Expand All @@ -40,6 +37,6 @@
"@geoman-io/leaflet-geoman-free": "^2.14.2",
"react": "^17.0.0 || ^18.0.0",
"react-dom": "^17.0.0 || ^18.0.0",
"react-leaflet": "^4.0.2"
"react-leaflet": "^4"
}
}
3 changes: 1 addition & 2 deletions src/GeomanControls.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ import '@geoman-io/leaflet-geoman-free'
import { useLayoutEffect, useEffect, useState } from 'react'
import { useLeafletContext } from '@react-leaflet/core'
import type { LayerGroup } from 'leaflet'
import useDeepCompareEffect from 'use-deep-compare-effect'

import type { GeomanProps } from './types'
import { reference, layerEvents, globalEvents, mapEvents } from './events'
Expand Down Expand Up @@ -56,7 +55,7 @@ export default function GeomanControls({
if (mounted) map.pm.setPathOptions(pathOptions)
}, [pathOptions, mounted])

useDeepCompareEffect(() => {
useEffect(() => {
// set global options
if (mounted)
map.pm.setGlobalOptions({ layerGroup: container, ...globalOptions })
Expand Down
25 changes: 0 additions & 25 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -206,13 +206,6 @@
"@babel/plugin-syntax-jsx" "^7.18.6"
"@babel/types" "^7.18.10"

"@babel/runtime@^7.12.5":
version "7.18.9"
resolved "https://registry.yarnpkg.com/@babel/runtime/-/runtime-7.18.9.tgz#b4fcfce55db3d2e5e080d2490f608a3b9f407f4a"
integrity sha512-lkqXDcvlFT5rvEjiu6+QYO+1GXrEHRo2LOtS7E4GtX5ESIZOgepqsZBVIj6Pv+a6zqsya9VCgiK1KAK4BvJDAw==
dependencies:
regenerator-runtime "^0.13.4"

"@babel/template@^7.18.10", "@babel/template@^7.18.6":
version "7.18.10"
resolved "https://registry.yarnpkg.com/@babel/template/-/template-7.18.10.tgz#6f9134835970d1dbf0835c0d100c9f38de0c5e71"
Expand Down Expand Up @@ -722,11 +715,6 @@ debug@^4.1.0:
dependencies:
ms "2.1.2"

dequal@^2.0.2:
version "2.0.3"
resolved "https://registry.yarnpkg.com/dequal/-/dequal-2.0.3.tgz#2644214f1997d39ed0ee0ece72335490a7ac67be"
integrity sha512-0je+qPKHEMohvfRTCEo3CrPG6cAzAYgmzKyxRiYSSDkS6eGJdyVJm7WaYA5ECaAD9wLB2T4EEeymA5aFVcYXCA==

electron-to-chromium@^1.4.202:
version "1.4.233"
resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.4.233.tgz#aa142e45468bda111b88abc9cc59d573b75d6a60"
Expand Down Expand Up @@ -1180,11 +1168,6 @@ readdirp@~3.6.0:
dependencies:
picomatch "^2.2.1"

regenerator-runtime@^0.13.4:
version "0.13.9"
resolved "https://registry.yarnpkg.com/regenerator-runtime/-/regenerator-runtime-0.13.9.tgz#8925742a98ffd90814988d7566ad30ca3b263b52"
integrity sha512-p3VT+cOEgxFsRRA9X4lkI1E+k2/CtnKtU4gcxyaCUreilL/vqI6CdZ3wxVUx3UOUg+gnUOQQcRI7BmSI656MYA==

resolve@^1.17.0, resolve@^1.22.1:
version "1.22.1"
resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.22.1.tgz#27cb2ebb53f91abb49470a928bba7558066ac177"
Expand Down Expand Up @@ -1313,14 +1296,6 @@ update-browserslist-db@^1.0.5:
escalade "^3.1.1"
picocolors "^1.0.0"

use-deep-compare-effect@^1.8.1:
version "1.8.1"
resolved "https://registry.yarnpkg.com/use-deep-compare-effect/-/use-deep-compare-effect-1.8.1.tgz#ef0ce3b3271edb801da1ec23bf0754ef4189d0c6"
integrity sha512-kbeNVZ9Zkc0RFGpfMN3MNfaKNvcLNyxOAAd9O4CBZ+kCBXXscn9s/4I+8ytUER4RDpEYs5+O6Rs4PqiZ+rHr5Q==
dependencies:
"@babel/runtime" "^7.12.5"
dequal "^2.0.2"

vite-plugin-checker@^0.4.9:
version "0.4.9"
resolved "https://registry.yarnpkg.com/vite-plugin-checker/-/vite-plugin-checker-0.4.9.tgz#ec0c6cd5c1d98a826915a729cf1de3026c8db3bb"
Expand Down

0 comments on commit 7376f0b

Please # to comment.