Closed kylpo closed 7 years ago
Refer to learnings at https://github.com/kylpo/notes/blob/master/shouldComponentUpdate.md#shouldcomponentupdate
Maybe I can shallowCompare all non-children props, then also shallowCompare children.props?
shallowCompare
children.props
Or move everything to state with cwrp. Prune render to just cloneElement() with its state.
cloneElement()
Also https://github.com/kylpo/notes/blob/master/HOC-and-cloneElement.md#reactcloneelement-workings
Refer to learnings at https://github.com/kylpo/notes/blob/master/shouldComponentUpdate.md#shouldcomponentupdate
Maybe I can
shallowCompare
all non-children props, then alsoshallowCompare
children.props
?Or move everything to state with cwrp. Prune render to just
cloneElement()
with its state.Also https://github.com/kylpo/notes/blob/master/HOC-and-cloneElement.md#reactcloneelement-workings