4 Replies
I believe that useEffect, when using React.StrictMode, is actually called twice. So if you are expecting 2 console logs that may explain why you are actually getting 4. I am new to React so I may be completely wrong.
To extend my answer, as I understand it, when using the default StrictMode React is running all the hooks twice. This only happens in dev.
Unknown User•2y ago
Message Not Public
Sign In & Join Server To View
Svelte looks amazing. I want to get a bit better at React first (as it is more commonly requested) before getting into Svelte. I can't wait!
Unknown User•2y ago
Message Not Public
Sign In & Join Server To View