Why can I return a function from onMount?
Quick question:
I'm allowed to (as in "TypeScript allows me to") return a function from the function I declare inside onMount.
The docs does not comment on this (https://docs.solidjs.com/reference/lifecycle/on-mount), so what does it do? When is the returned function run?
Example:
I'm allowed to (as in "TypeScript allows me to") return a function from the function I declare inside onMount.
The docs does not comment on this (https://docs.solidjs.com/reference/lifecycle/on-mount), so what does it do? When is the returned function run?
Example: