3 ms·
Fantastic article, in the past 9 months you've hit on nearly all of my discoveries. Something I do now every time I create a new react app is to create a base
by jastanton 11y ago
Fantastic article, in the past 9 months you've hit on nearly all of my discoveries.
Something I do now every time I create a new react app is to create a base class that extends React.Component that uses `PureRenderMixin`. When doing this I can prevent unnecessary renders from props changes. A killer of this would be passing an prop to a child that always changes its identity, like passing a function that calls `bind`, Because bind create a new method every time its call the identity always changes and the method will always be re-rendered. Knowing gotchas like these can help really speed up apps!