Re:Treating performance as a product: The technical story of...
by riquito on Tuesday August 29, 2017 @03:41PM
(#15127028)
It looks like a standard dark pattern in React, you are re-rendering more components than needed on certain inputs changes, you should ask him in which input he's typing, it would probably more useful than his user name
[ Parent
| on HN ]
Re:Treating performance as a product: The technical story of...
by blub on Wednesday August 30, 2017 @04:11AM
(#15130502)
Anti-pattern. Dark patterns are tricks used to manipulate users.
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?
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.
Re:Treating performance as a product: The technical story of...
by azinman2 on Tuesday August 29, 2017 @05:45PM
(#15127872)
Not trying to start a flame war, but do you know for sure “he” is a “he”?