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
Is your feature request related to a problem? Please describe.
When using Listenable with useEffect it can be a bit cumbersome to always repeat the same boilerplate off addListener and removeListener again and again:
Having to call keys.length times addListener
Duplication of key in keys and key.addListener(...) for each key
Extra level of indentation when writing the listener inside the useEffect closure
Is your feature request related to a problem? Please describe.
When using
Listenable
withuseEffect
it can be a bit cumbersome to always repeat the same boilerplate offaddListener
andremoveListener
again and again:keys.length
timesaddListener
key.addListener(...)
for each keyuseEffect
closureDescribe the solution you'd like
Add a
useListener
hook.Additional context
This would be very useful to bind values when some controller changes:
and even when it depends on multiple controllers like:
The text was updated successfully, but these errors were encountered: