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
In the linked issue, @bvaughnexplains that this is referring to chains of synchronous updates using componentDidUpdate. However, the useSubscription hook now uses a passive useEffect(), as opposed to a synchronous componentDidUpdate().
Would this mean that it's no longer "de-opting to sync mode", and the warning could be removed from the README?
The text was updated successfully, but these errors were encountered:
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contribution.
The wording of the README isn't super accurate for useSubscription. I kind of copy-pasted that READ (with some tweaks) from createSubscription.
That being said, useSubscription() still has some downsides (both deopts and potential tearing). The decision to use a passive effect instead of an active one was a tradeoff between lesser bad options essentially.
I took the time this afternoon to create a Gist outlining the de-opt and potential tearing cases for useSubscription and a new hook (not yet created but soon to be RFCed) called useMutableSource: https://gist.github.com/bvaughn/054b82781bec875345bd85a5b1344698
If you'd like to send a PR to update the wording on the use-subscription README, tag me as a reviewer. Else I will do a pass eventually when I get to implementing this new hook.
Do you want to request a feature or report a bug?
Outdated README (maybe?)
What do the docs currently say?
In the linked issue, @bvaughn explains that this is referring to chains of synchronous updates using
componentDidUpdate
. However, theuseSubscription
hook now uses a passiveuseEffect()
, as opposed to a synchronouscomponentDidUpdate()
.Would this mean that it's no longer "de-opting to sync mode", and the warning could be removed from the README?
The text was updated successfully, but these errors were encountered: