-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Split AuthContext export from Auth.tsx for React Fast Refresh compatibility #3284
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
base: main
Are you sure you want to change the base?
Conversation
Co-authored-by: cprecioso <511681+cprecioso@users.noreply.github.com>
|
@copilot |
Co-authored-by: cprecioso <511681+cprecioso@users.noreply.github.com>
|
@copilot |
Co-authored-by: cprecioso <511681+cprecioso@users.noreply.github.com>
Updated the e2e kitchen-sink golden snapshot with the new AuthContext.tsx file in commit e8ea1f0. The e2e:accept-all test had issues with npm process management, but I've manually verified and updated the kitchen-sink snapshot. Now running full tests...
Test results:
The e2e test failure appears to be an environment issue unrelated to the Auth changes. The unit tests pass and manual compilation shows the AuthContext.tsx file is generated correctly with proper imports in Auth.tsx and all consumer files. Commits: e8ea1f0 Warning Firewall rules blocked me from connecting to one or more addresses (expand for details)I tried to connect to the following addresses, but was blocked by firewall rules:
If you need me to access, download, or install something from one of these locations, you can either:
|
|
We extracted this exact piece of logic into a separate lib in this PR: #2989 so this change might not be necessary after we merge the libs PR. I'll keep it open until then. |
auth/forms/Auth.tsxexports are incompatible with React Fast Refresh #3269From @cprecioso:
Vite's React Fast Refresh requires files to export only React components.
auth/forms/Auth.tsxwas exporting both theAuthcomponent and theAuthContext, causing HMR to fall back to full page reloads. Now we split it.