Update frontend guide to reflect new paradigm for api organization (#43435)

This commit is contained in:
Uchechukwu Obasi 2021-12-23 09:28:41 +01:00 committed by GitHub
parent 59e153cde8
commit eb4c3a4485
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -255,6 +255,7 @@ Organize your code in a directory that encloses feature code:
- Put React components in `components` directory (i.e. `features/my-feature/components/ButtonPeopleDreamOf.tsx`).
- Put test files next to the test subject.
- Put containers (pages) in feature root (i.e. `features/my-feature/DashboardPage.tsx`).
- Put API function calls that isn't a redux thunk in an `api.ts` file within the same directory.
- Subcomponents can live in the component folders. Small component do not need their own folder.
- Component SASS styles should live in the same folder as component code.