Use Recompose to memoize prop values
export default (props, context) => {
// ... do expensive compute on props ...
return <SomeComponent {...props} />
}
import { pure } from 'recompose';
// This won't be called when the props DONT change
export default pure((props, context) => {
// ... do expensive compute on props ...
return <SomeComponent someProp={props.someProp}/>
})