rsnext/errors/fast-refresh-reload.mdx

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

22 lines
658 B
Text
Raw Normal View History

---
title: Fast Refresh had to perform full reload
---
2022-11-28 14:18:26 +01:00
## Why This Error Occurred
2022-11-28 14:18:26 +01:00
Fast Refresh had to perform a full reload when you edited a file. It may be because:
- The file you're editing might have other exports in addition to a React component.
- Your React component is an anonymous function.
- The component name is in camelCase and not PascalCase, for example `textField` instead of `TextField`.
2022-11-28 14:18:26 +01:00
## Possible Ways to Fix It
2022-11-28 14:18:26 +01:00
- Move your other exports to a separate file.
- Use a named function for your React component.
- Rename your component name to pascal case.
2022-11-28 14:18:26 +01:00
## Useful Links
2022-11-28 14:18:26 +01:00
[Fast Refresh documentation](/docs/architecture/fast-refresh)