Skip to content

Commit

Permalink
Update 07.spreading-props-dom.md
Browse files Browse the repository at this point in the history
Fix typo
  • Loading branch information
cho-leukeleu authored Jun 25, 2018
1 parent d0057c9 commit 8da6174
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion anti-patterns/07.spreading-props-dom.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ const Spread = ({ flag, ...domProps }) => (<div {...domProps}>Test</div>);

*Note*

In [scenarios](https://github.com/vasanthk/react-bits/issues/34) where you use a [PureComponent](../perf-tips/02.pure-component.md), when an update happens it re-renders the component even if `domProps` did not changed. This is because PureComponent only [shallowly compares](https://facebook.github.io/react/docs/react-api.html#react.purecomponent) the objects.
In [scenarios](https://github.com/vasanthk/react-bits/issues/34) where you use a [PureComponent](../perf-tips/02.pure-component.md), when an update happens it re-renders the component even if `domProps` did not change. This is because PureComponent only [shallowly compares](https://facebook.github.io/react/docs/react-api.html#react.purecomponent) the objects.

### Related links:
- [React Design Patterns and best practices by Michele Bertoli.](https://github.com/MicheleBertoli/react-design-patterns-and-best-practices)
Expand Down

0 comments on commit 8da6174

Please sign in to comment.