Replies: 1 comment
-
This is probably because you're running React in strict mode. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
On initial mount console.log is executed two times (check logs at bottom right):
Reproduction:
https://codesandbox.io/s/sweet-roentgen-v2kdl6?file=/src/App.js
Is it expected? Can I make it to execute only one time on mount?
PS: sometimes
console.log
is executed only once but most of the time it's executed twiceBeta Was this translation helpful? Give feedback.
All reactions