2 ms·
>For that matter, you could also write: >onMount(listenForAuthChanges) >which is technically simpler -- you're not constructing a new anonymous function. Not
by filoleg 6y ago
>For that matter, you could also write:
>onMount(listenForAuthChanges)
>which is technically simpler -- you're not constructing a new anonymous function.
Not just technically simpler, it is a perf improvement over initializing an anonymous function every time onMount is called (which you have already mentioned, I just wanted to emphasize). A minor performance improvement at that, but still, small things add up. I agree with the entirety of your post, however, well-written.