drcmda / drcmda/react-contextual
Subscriber component causes re-mount of children on prop changes
Open
- Dominant language
- JavaScript
- Stars
- 638
- Forks
- 21
- PR merge metrics
- No merged PRs in 30d
Description
The subscriber HOC works fine, but the Component causes all children to re-mount on any prop changes.

See demo here: https://codesandbox.io/s/4jr86n2w77
Typing into `Component` text box loses focus on each keypress (due to re-mount), whereas the HOC works fine.
I suspect this is due to creating a new react element on each prop change here: https://github.com/drcmda/react-contextual/blob/master/src/subscribe.js#L73
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.