A component to declaratively memoise a computation within a React component.
npm install react-memoise

Given a
鉂わ笍
React
路 Jest
路 Prettier
路 Flow
路 Enzyme
路 ESLint
路 Babel
路 Rollup
馃檹
Just yarn add react-memoise or npm i react-memoise.
#### Using the Function as a Child pattern
``jsx
import Memoise from 'react-memoise';
const ParentComponent = props => (
{computedValue => {computedValue}}
);
`
#### Using a render-prop
`jsx
import Memoise from 'react-memoise';
const ParentComponent = props => (
compute={(a, b => a * b)}
render={computedValue => {computedValue}}
/>
);
`
#### Using a component
`jsx
import Memoise from 'react-memoise';
const ConsumerComponent = props => {props.computedValue};
const ParentComponent = props => (
compute={(a, b => a * b)}
component={ConsumerComponent}
/>
);
`
#### Customization
You can pass in an areArgsEqual prop with the signature of (prevArgs: Args, nextArgs: Args) => boolean` to customise the equality check which defaults to a shallow equal.