Closed wmertens closed 7 years ago
Exact use case
Fixed by #6
Fixed by #6
@neoziro wouldn't it be nicer to provide a reference implementation of the shouldUpdate
function for contextName
-only updates?
I was about to write an implementation but then realized there is a problem with #6. I filed https://github.com/gaearon/react-deep-force-update/issues/8 for it.
I use this to update components that use context to get translation strings after the language was switched.
I know this uses internal APIs, but using this is much nicer than either constantly managing 100+ listeners or force-rerendering the app through a
key
on the root element.It would be even nicer if it would only update components that use the context in the first place. Would that be difficult to do? Would you accept a PR that does this?