Re:Treating performance as a product: The technical story of...
by pspeter3 on Tuesday August 29, 2017 @04:57PM
(#15127542)
Thanks for the advice. Do you agree a potential optimization would be using React component state instead of store state?
[ Parent
| on HN ]
Re:Treating performance as a product: The technical story of...
by mikewhy on Tuesday August 29, 2017 @06:06PM
(#15128027)
You should use React.PureComponent whenever possible. And stateless functions always re-render. There's no chance of using "shouldComponentUpdate".
Using store state vs local state shouldn't matter much, as long as your components are pure and only pull what they need from the store.