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

weird id bug #21

Closed
sibbng opened this issue Jan 13, 2021 · 3 comments
Closed

weird id bug #21

sibbng opened this issue Jan 13, 2021 · 3 comments

Comments

@sibbng
Copy link
Collaborator

sibbng commented Jan 13, 2021

Hi, I'm working on an issue about unmounting components.

I put some loggers in: sibbng@c98bd75

When components gets mounted, their id getting icreased. I didn't find any reason for why this is happening. This is only happening on vite dev mode. vite build is working fine.

vite version: 2.0.0-beta.23
@vitejs/plugin-react-refresh: 1.1.1

My vite project template https://github.com/sibbng/reactivue-bug

id.mp4
@sibbng
Copy link
Collaborator Author

sibbng commented Jan 13, 2021

I have tested it with Preact. It works as expected in dev mode. Tried removing @vitejs/plugin-react-refresh on react template and tested again in dev mode. But this issue still exist :/

@sibbng
Copy link
Collaborator Author

sibbng commented Jan 13, 2021

I have also tested it on create-react-app without reactivue, just a simple component. Same behaviour. Looks like issue is about storing that id outside of react. Probably we have to connect it to our react component with useContext or somehow. I will look into it.

@sibbng
Copy link
Collaborator Author

sibbng commented Jan 14, 2021

I found its reason: facebook/react#15074

I will think about what we do with it. This is not really an issue if you are not using strict mode. Closing issue for now.

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

1 participant