Prevents component re-rendering caused by object literals passed as props.
Using yarn :
yarn add -D react-object-prop-persist
Using npm :
npm install --save-dev react-object-prop-persist
Simply add this plugin in your App's babel.config.js
:
module.exports = function (api) {
api.cache(true);
return {
presets: [...YOUR_APP_PRESETS],
plugins: ["react-object-prop-persist", ...YOUR_OTHER_PLUGINS],
};
};
- clone this Repo
-
yarn
ornpm install
-
cd example && yarn && cd ..
orcd example && npm install && cd ..
-
yarn dev:web
ornpm run dev:web
to run the example app make your changes inindex.js
.