Skip to content

[BUG] All 4 context files break Vite Fast Refresh (HMR) due to mixed exports #373

@Adez017

Description

@Adez017

Describe the bug

All 4 React context files export both a context object and a provider component from the same file. Vite's Fast Refresh (Hot Module Replacement) only works correctly when a file exports only React components. Mixing context object exports with component exports causes Fast Refresh to silently fail — every time any context file is edited during development, the entire page does a hard reload instead of a fast component-level update.
This significantly slows down the development experience.

Steps to reproduce

1. go to the react files
2. make the changes in the context
3. save and verify the loading .

Expected behavior

No react-refresh/only-export-components ESLint errors. Fast Refresh works correctly during development — editing a context file triggers a fast component update, not a full page reload.

Affected component

Frontend (React/Vue)

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions