Creates an effect calling the given function once immediately and then again every time a recorded dependency has changed.
The effect function to run. Can optionally return a cleanup function which is called before effect function is called again and on effect destruction.
Creates an effect calling the given function once immediately and then again every time a recorded dependency has changed.