5 ms·
> you need to subscribe to changes manually (use effect) to create computations How do you mean? Since the render function reruns during every update to state/
by azangru 4mo ago
> you need to subscribe to changes manually (use effect) to create computations
How do you mean? Since the render function reruns during every update to state/props, derived/computed values can be calculated from the updated state/props during rendering.
- halflife 4mo agoWhen all you need is a synchronous operations, yes. When it involves async, batching, buffering, and user input, it becomes much more complicated, and every step needs to be setup manually.