2 ms·
Then how do I emulate onMount now?
by Kiro 3y ago
Then how do I emulate onMount now?
- rkuykendall-com 3y agoYou have to use a useRef then inside your useEffect of [] you check if it is false and it it is you set it to true then run your code. If anyone reads this and I am wrong please comment, but from what I can see that's the only solution.