How components can help us govern agents

How components can help us govern agents

onMount runs once when the component becomes visible. onUnmount runs once when it leaves. onError catches anything either of them throws and receives { source, error }, where source is “mount”, “unmount”, “beforeDispose”, or “action”. The agent does not write a return value, does not pick a dependency array, does not name a cleanup function. There is nothing to forget. …