src/
├── components/
│ ├── Button/
│ │ ├── Button.js
│ │ ├── Button.css
│ ├── Title/
│ │ ├── Title.js
│ │ ├── Title.css
│ ├── Container/
│ │ ├── Container.js
│ │ ├── Container.css
├── pages/
│ ├── HomePage/
│ │ ├── HomePage.js
│ │ ├── HomePage.css
│ ├── AboutPage/
│ │ ├── AboutPage.js
│ │ ├── AboutPage.css
├── App.js
├── index.js
Breakdown of the file structure:
- The components directory contains individual component folders. Each component has its own folder with separate files for the component's JavaScript logic (ComponentName.js) and CSS styles (ComponentName.css).
- The pages directory contains page-specific components. Each page has its own folder with separate files for the page's JavaScript logic (PageName.js) and CSS styles (PageName.css).
- The App.js file serves as the entry point for the application. It acts as a container component that renders the different pages and components.
- The index.js file is responsible for rendering the App component and mounting it to the root DOM element.
'FRONTEND' 카테고리의 다른 글
React Topics (0) | 2023.06.25 |
---|---|
[6. React.js] Performance Optimization: UseMemo vs UseCallBack (0) | 2023.06.21 |
[5. React.js] UseContext vs Redux (0) | 2023.06.18 |
[4. React.js] Multiple Dependency Array in fetchData() (0) | 2023.06.18 |
[3. React.js] Link to new Page vs Pass to Component [Props] (0) | 2023.06.18 |