Skip to content

[ENHANCEMENT] Fix Vite Fast Refresh warnings in Context Providers #422

@Adithyakp86

Description

@Adithyakp86

Problem

Vite's Fast Refresh often fails for Context Provider files because they export both the Context and the Provider component. This triggers a lint error: Fast refresh only works when a file only exports components.

Proposal

Separate the context creation and the Provider component into different files.

  1. Move createContext calls to dedicated .js files (e.g., AuthContextInstance.js).
  2. Keep the Provider component in the .jsx file.
  3. Update imports across the app.

Scope

  • DX (Developer Experience) / Code readability

Assign this issue to me under the oscg

Metadata

Metadata

Assignees

Labels

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions