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

Fast Refresh: "Anonymous arrow functions cause Fast Refresh to not preserve local component state." #303

Open
mikestopcontinues opened this issue Aug 16, 2020 · 1 comment

Comments

@mikestopcontinues
Copy link

React's new Fast Refresh wants the components exported by react-svg-loader to have a name. Here's the full error:

Anonymous arrow functions cause Fast Refresh to not preserve local component state.
Please add a name to your function, for example:

Before
export default () => <div />;

After
const Named = () => <div />;
export default Named;
@mikestopcontinues
Copy link
Author

If anyone shows up here, just switch to svgr.

@lagunovsky lagunovsky mentioned this issue Oct 16, 2021
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