Skip to content

Instantly share code, notes, and snippets.

@9oelM
Last active October 3, 2019 05:13
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save 9oelM/f1c05a86297c92d0fd34d6052d2d7429 to your computer and use it in GitHub Desktop.
Save 9oelM/f1c05a86297c92d0fd34d6052d2d7429 to your computer and use it in GitHub Desktop.
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