Skip to content

Commit

Permalink
feat: use shallow-equal over fbjs (#587)
Browse files Browse the repository at this point in the history
  • Loading branch information
eps1lon authored Feb 10, 2020
1 parent 99dee31 commit 9038d53
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 5 deletions.
4 changes: 2 additions & 2 deletions packages/react-swipeable-views-utils/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,11 @@
},
"dependencies": {
"@babel/runtime": "7.0.0",
"fbjs": "^0.8.4",
"keycode": "^2.1.7",
"prop-types": "^15.6.0",
"react-event-listener": "^0.6.0",
"react-swipeable-views-core": "^0.13.7"
"react-swipeable-views-core": "^0.13.7",
"shallow-equal": "^1.2.1"
},
"devDependencies": {
"pkgfiles": "^2.3.2"
Expand Down
4 changes: 2 additions & 2 deletions packages/react-swipeable-views-utils/src/autoPlay.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import React from 'react';
import PropTypes from 'prop-types';
import shallowEqual from 'fbjs/lib/shallowEqual';
import { shallowEqualObjects } from 'shallow-equal';
import EventListener from 'react-event-listener';
import { mod } from 'react-swipeable-views-core';

Expand Down Expand Up @@ -31,7 +31,7 @@ export default function autoPlay(MyComponent) {
}

componentDidUpdate(prevProps) {
const shouldResetInterval = !shallowEqual(
const shouldResetInterval = !shallowEqualObjects(
{
index: prevProps.index,
interval: prevProps.interval,
Expand Down
7 changes: 6 additions & 1 deletion yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -4811,7 +4811,7 @@ fastparse@^1.1.1:
resolved "https://registry.yarnpkg.com/fastparse/-/fastparse-1.1.1.tgz#d1e2643b38a94d7583b479060e6c4affc94071f8"
integrity sha1-0eJkOzipTXWDtHkGDmxK/8lAcfg=

fbjs@^0.8.1, fbjs@^0.8.16, fbjs@^0.8.4:
fbjs@^0.8.1, fbjs@^0.8.16:
version "0.8.17"
resolved "https://registry.yarnpkg.com/fbjs/-/fbjs-0.8.17.tgz#c4d598ead6949112653d6588b01a5cdcd9f90fdd"
integrity sha1-xNWY6taUkRJlPWWIsBpc3Nn5D90=
Expand Down Expand Up @@ -9428,6 +9428,11 @@ shallow-clone@^3.0.0:
dependencies:
kind-of "^6.0.2"

shallow-equal@^1.2.1:
version "1.2.1"
resolved "https://registry.yarnpkg.com/shallow-equal/-/shallow-equal-1.2.1.tgz#4c16abfa56043aa20d050324efa68940b0da79da"
integrity sha512-S4vJDjHHMBaiZuT9NPb616CSmLf618jawtv3sufLl6ivK8WocjAo58cXwbRV1cgqxH0Qbv+iUt6m05eqEa2IRA==

shebang-command@^1.2.0:
version "1.2.0"
resolved "https://registry.yarnpkg.com/shebang-command/-/shebang-command-1.2.0.tgz#44aac65b695b03398968c39f363fee5deafdf1ea"
Expand Down

0 comments on commit 9038d53

Please sign in to comment.