[X] Check that there isn't already an issue that reports the same bug to avoid creating a duplicate.
[X] Make sure this is a Vite issue and not a framework-specific issue. For example, if it's a Vue SFC related bug, it should likely be reported to vuejs/core instead.
Describe the bug
Cannot use context api in react with vite, the state just disappears in xhr hot reload
Reproduction
....
System Info
Used Package Manager
npm
Logs
No response
Validations