Become a member
Sign in
Sense Luo
Sense Luo

Sense Luo

102 Following
31 Followers
·
  • Profile
  • Claps
  • Highlights
  • Responses

Highlighted by Sense Luo

See more

From React is Slow, React is Fast: Optimizing React Apps in Practice by François Zaninotto

I can even be more specific and target only the props that I know may change, using recompose’s shouldUpdate() instead of pure():

From React is Slow, React is Fast: Optimizing React Apps in Practice by François Zaninotto

The only difference between this code and the initial implementation is the last line: I export pure(DatagridBody) instead of DatagridBody. pure is like PureComponent, but without the extra class boilerplate.

From React is Slow, React is Fast: Optimizing React Apps in Practice by François Zaninotto

class DatagridBody extends Component {
shouldComponentUpdate(nextProps) {
return (nextProps.ids !== this.props.ids
|| nextProps.data !== this.props.data);
}

Claps from Sense Luo

See more

Great article. I ended up removing lodash in my selectors:

Svein Petter Gjøby

React/Redux Tips: Better Way to Handle Loading Flags in Your Reducers

Sam Aryasa

Migrate JS project to Typescript, one function at a time

Ryan Chen