preactjs / signals

Manage state with style in every framework
https://preactjs.com/blog/introducing-signals/
MIT License
3.71k stars 91 forks source link

Question: is it possible to update the signal value in useEffect (preact) ? #409

Closed WoodenPC closed 1 year ago

WoodenPC commented 1 year ago

Question: is it possible to update the signal value in useEffect ?

i have app written with preact

i created signal and want to update it value inside useEffect after fetch, is it correct way to update signal value ?

rschristian commented 1 year ago

Sure, you can do that.