Last active
October 3, 2019 05:13
-
-
Save 9oelM/f1c05a86297c92d0fd34d6052d2d7429 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import JSONfn from 'json-fn' | |
import isEqual from 'react-fast-compare' | |
export const areEqual = (prevProps, nextProps) => { | |
const [prev, next] = [prevProps, nextProps].map(JSONfn.stringify) | |
return isEqual(prev, next) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment