DEV - Write documentation requiring React components to have .jsx extension instead of .js #1823
Labels
Feature: Code Health
Make our code more readable, testable, and modular
Role: Frontend
React front end work
size: 0.25pt
Can be done in 1.5 hours
Milestone
Dependency
Overview
As a consequence of our Vite migration, we need to document the necessity for components to have .jsx file extensions
More Info
Traditionally, React components may be written in either .js or .jsx files. Our new build tool, Vite, requires that all files containing React components have the .jsx extension. This practice helps to prevent errors during Vite's static analysis of imported files.
Action Items
.jsx
extensionsMore Info
section into the wiki pageResources/Instructions
Links for page's content
.jsx
extension works with Vite not.js
extension in React? vitejs/vite#13715 (comment) quoting Evan You, creator of ViteMigrated Files
The text was updated successfully, but these errors were encountered: