Skip to content

Commit fde6ec6

Browse files
authored
Merge pull request #4242 from nikitajz/patch-1
docs(part2a): Projects structure layout for components
2 parents cb84d3b + 2267c7e commit fde6ec6

File tree

1 file changed

+11
-1
lines changed

1 file changed

+11
-1
lines changed

src/content/2/en/part2a.md

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -413,7 +413,17 @@ import App from "./App"
413413

414414
Let's move our <i>Note</i> component into its own module.
415415

416-
In smaller applications, components are usually placed in a directory called <i>components</i>, which is in turn placed within the <i>src</i> directory. The convention is to name the file after the component.
416+
In smaller applications, components are usually placed in a directory called <i>components</i> within the <i>src</i> directory. The convention is to name the file after the component.
417+
418+
```shell
419+
src/
420+
├── main.jsx # Entry point
421+
├── App.jsx # Main App component
422+
└── components/ # All reusable components
423+
├── Note.jsx # Named after the component
424+
├── Header.jsx
425+
└── Footer.jsx
426+
```
417427

418428
Now, we'll create a directory called <i>components</i> for our application and place a file named <i>Note.jsx</i> inside. The contents of the file are as follows:
419429

0 commit comments

Comments
 (0)