You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
|
|
---
|
|
|
|
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
|
|
|
|
```
|