[React] Why is useEffect called twice when passing an empty array?

React's strict mode cannot automatically detect side effects and intentional double calls. Just comment out the strict mode.
Insert image description here

Guess you like

Origin blog.csdn.net/owo_ovo/article/details/135394417