Open afrankel-sfdo opened 5 years ago
@drcmda #bump. Is this project still being maintained? Do you welcome PRs?
@afrankel-sfdo, PR's would be most welcome.
@smeijer I updated the code sandbox to better demonstrate the component remounting (HOC is fine) via console logs. Curious if you had any pointers for how to resolve before I dive in.
https://codesandbox.io/s/qkx5x5y5qj
@smeijer bump. Any guidance before I try to resolve this?
@smeijer ??
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