Closed gabrielcoronel closed 5 months ago
You can return function from effect and it will run when effect dependencies changed
You can return function from effect and it will run when effect dependencies changed
Ok, I didn't know that. Is that in any official documentation you could me point me to?
Seems to be there is no info in docs about it but, it's obvious from types
I think we should add info about it
I submitted a pull request to the documentation repository including information about signals
What I mean by "clean up functions" is a signal analog to traditional React's
useEffect
clean up functions. For example, withuseEffect
one can set a clean up function for an update effect, this function will run right before the next update, "undoing" ("cleaning up") such effect:Do signal
effect
s (useSignalEffect
) support this feature? If so, how? If not, what is signals' alternative for "cleaning up" effects?I've read through the documentation and I haven't find anything similar so far.