I know you mentioned there's no fancy features in this library, but I took liberty to propose 2 updates.
untracked function seemingly must return a value - I missed that out making #5
effect callback can return a teardown (like useEffect) - not directly documented in preact, but very handy feature, low-hanging fruit. It's minor breakage of existing API, but in favor of more standardization.
Please let me know if you find value in these changes.
Hi @WebReflection
I know you mentioned there's no fancy features in this library, but I took liberty to propose 2 updates.
untracked
function seemingly must return a value - I missed that out making #5effect
callback can return a teardown (likeuseEffect
) - not directly documented in preact, but very handy feature, low-hanging fruit. It's minor breakage of existing API, but in favor of more standardization.Please let me know if you find value in these changes.