mirror of
https://github.com/reactjs/react.dev.git
synced 2026-02-24 20:53:08 +00:00
* Don't use experimental syntax unless necessary * Edit another page * Update another page * Unrelated bikeshed on virtual DOM * Please, no *.jsx, we don't recommend it * Update faq-structure.md * Minor updates * Update faq-ajax.md * Update faq-functions.md * Add binding explanation
26 lines
460 B
Markdown
26 lines
460 B
Markdown
---
|
|
id: faq-structure
|
|
title: File Structure
|
|
permalink: docs/faq-structure.html
|
|
layout: docs
|
|
category: FAQ
|
|
---
|
|
|
|
### Is there a recommended way to structure React projects?
|
|
|
|
One common way to structure projects is locate CSS, JS, and tests together inside folders grouped by feature or route.
|
|
|
|
```
|
|
FeatureA
|
|
index.js
|
|
ComponentA.js
|
|
ComponentA.css
|
|
ComponentA.test.js
|
|
Helper.js
|
|
Helper.test.js
|
|
FeatureB
|
|
index.js
|
|
ComponentB.js
|
|
ComponentB.test.js
|
|
```
|