-
-
Notifications
You must be signed in to change notification settings - Fork 229
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
Add eslint-plugin-react-refresh #4379
Conversation
This stack of pull requests is managed by Graphite. Learn more about stacking. |
34d7006
to
4d3ea4a
Compare
Quick links (staging server):
Login:
SVG tester:Number of differences (default views): 0 ✅ Edited: 2025-01-03 17:16:51 UTC |
4d3ea4a
to
4968f76
Compare
4968f76
to
16df04b
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Super nice! This is a huge improvement for working on our react components where the fast refresh is supported. Thanks a lot for doing this!
Fast Refresh is a feature that lets you edit React components in a running application without losing their state. It is similar to an old feature known as "hot reloading", but Fast Refresh is more reliable and officially supported by React. Vite already supports Fast Refresh, but it works only under specific conditions. This ESlint plugin helps us write components in a way that ensures they can be reloaded using Fast Refresh. We don't enable it for directories containing mostly class components, since it doesn't work for them. As part of this change I fixed the linter errors by refactoring the code, which means now many more components will be working with Fast Refresh, speeding up the local development. https://github.com/ArnaudBarre/eslint-plugin-react-refresh https://github.com/vitejs/vite-plugin-react/tree/main/packages/plugin-react#consistent-components-exports
Several files had the .tsx extension despite not containing any JSX.
16df04b
to
b11707e
Compare
Add eslint-plugin-react-refresh
Fast Refresh is a feature that lets you edit React components in a
running application without losing their state. It is similar to an old
feature known as "hot reloading", but Fast Refresh is more reliable and
officially supported by React.
Vite already supports Fast Refresh, but it works only under specific
conditions. This ESlint plugin helps us write components in a way that
ensures they can be reloaded using Fast Refresh. We don't enable it for
directories containing mostly class components, since it doesn't work
for them.
As part of this change I fixed the linter errors by refactoring the
code, which means now many more components will be working with Fast
Refresh, speeding up the local development.
https://github.com/ArnaudBarre/eslint-plugin-react-refresh
https://github.com/vitejs/vite-plugin-react/tree/main/packages/plugin-react#consistent-components-exports
Rename adminSiteServer files from .tsx to .ts
Several files had the .tsx extension despite not containing any JSX.