4 ms·
(tl;dr) The title is getting a lot of flack but I think there are two good patterns highlighted: 1) Avoid creating functions in React render and 2) Learn about
by cloverich 11y ago
(tl;dr) The title is getting a lot of flack but I think there are two good patterns highlighted: 1) Avoid creating functions in React render and 2) Learn about and use defaultProps.
1: Example of arrow functions + Class property initializer: http://babeljs.io/blog/2015/06/07/react-on-es6-plus/ http://babeljs.io/blog/2015/06/07/react-on-es6-plus/
2: Default Props: https://facebook.github.io/react/docs/reusable-components.html#default-prop-values https://facebook.github.io/react/docs/reusable-components.ht...