You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Sep 10, 2022. It is now read-only.
One thing I like about recompose is that it enables me to create complex stateful components out of functions that don't depend on context. Two examples are withState and withStateHandlers. state and stateUpdater are passed as props instead of bound to this. This is nice because I can write more generic functions that consume these values. The same is not true for lifecycle. The handlers passed to lifecycle are given to their respective hooks without any context abstraction. So for these handlers, I either have to write that wrapper myself or write functions tied to this. Is there any interest in updating lifecycle to pass the context into the handler like withState and withStateHandlers?
One thing I like about recompose is that it enables me to create complex stateful components out of functions that don't depend on context. Two examples are
withStateandwithStateHandlers.stateandstateUpdaterare passed as props instead of bound tothis. This is nice because I can write more generic functions that consume these values. The same is not true forlifecycle. The handlers passed tolifecycleare given to their respective hooks without any context abstraction. So for these handlers, I either have to write that wrapper myself or write functions tied tothis. Is there any interest in updatinglifecycleto pass the context into the handler likewithStateandwithStateHandlers?