Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

console messages are appearing twice #4783

Closed
harish-sethuraman opened this issue Jun 30, 2022 · 2 comments
Closed

console messages are appearing twice #4783

harish-sethuraman opened this issue Jun 30, 2022 · 2 comments

Comments

@harish-sethuraman
Copy link
Collaborator

Seems like console messages are appearing twice in the console

Screen.Recording.2022-06-30.at.7.56.08.PM.mov
@Lalman888
Copy link

@harish-sethuraman You are running your app in strict mode. Go to index.js and comment strict mode tag. You will find a single render.
This happens is an intentional feature of the React.StrictMode. It only happens in development mode and should help to find accidental side effects in the render phase.

@harish-sethuraman
Copy link
Collaborator Author

Thanks 😅 Yea I knew that console messages are rendered twice in strict mode. But when I implemented the sandpack consoles I remember they appeared only once 🙈 #4672 (comment) . Just wanted to confirm if anyone else noticed the change in behaviour. Or may be (it never appeared once?) it was me who got it wrong 😅

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants