File tree Expand file tree Collapse file tree 2 files changed +16
-16
lines changed Expand file tree Collapse file tree 2 files changed +16
-16
lines changed Original file line number Diff line number Diff line change @@ -78,13 +78,13 @@ API_URL=http://api.domain.com
7878- Website server-side rendering framework: NextJS
7979- Package management: Webpack (included in NextJS)
8080- Transpiler: Speedy Web Compiler (included in NextJS)
81- - State management (client): React State
81+ - State management (client): Recoil
8282- State management (server): React-query v4
8383- HTTP interface: fetch API (part of WHATWG Web Standard)
8484- JavaScript Testing Framework: Jest
8585- React Testing Library: @testing-library/react
8686- Browser style normalization script: Normalize
87- - Stylesheet preprocessor: SASS/ SCSS
87+ - Stylesheet preprocessor: SCSS
8888- Stylesheet postprocessor: Postcss (included in NextJS)
8989- Postcss plugin: Autoprefixer (included in NextJS)
9090- Version control: Git
@@ -104,11 +104,11 @@ Root
104104 └── eachComponent
105105 ├── index.ts
106106 ├── eachComponent.module.scss
107- ├── eachComponentAdapter.tsx
108107 ├── eachComponentInteractor.tsx
108+ ├── eachComponentStates.ts
109109 ├── eachComponentPresenter.tsx
110110 ├── eachComponentViewName.tsx
111- └── eachComponentType.tsx
111+ └── eachComponentType.ts
112112├── controllers
113113 ├── index.ts
114114 ├── apiURLs.ts
119119├── pages
120120 ├── _app.tsx
121121 ├── _document.tsx
122+ ├── _error.tsx
123+ ├── 404.tsx
122124 ├── index.ts
123125 └── global.scss
124126├── public
Original file line number Diff line number Diff line change 1- # Fetching Dataflow
1+ # Data- Fetching Flow
22
33- ` State Layer ` ** stores & manages** data
44- ` Event Layer ` ** writes** data
88sequenceDiagram
99 participant B as Backend
1010
11- box rgb(50,50,255) State/Event Layer
11+ box rgb(50,50,255) State Layer
1212 participant Q as React-Query
13- participant I as Interactor
1413 end
1514
1615 box rgb(50,50,255) Display Layer
1716 participant P as Presenter
1817 participant V as View
1918 end
2019
21- Note over I : Loading
22- I ->>Q: useQuery()
20+ Note over P : Loading
21+ P ->>Q: useQuery()
2322 Q->>+B: fetch()
2423 B->>-Q: {Data}
25- Q->>I: Data
26- Note over I: Store
27- I->>P: useContext()
28- I->>V: useContext()
24+ Note over Q: Store
25+ Q->>P: QueryResult
26+ P->>V: props
2927```
3028
31- > In this diagram, state layer and event layer are combined
32- >
33- > ` Interactor ` manages both UI-states and events
29+ > ` Interactor ` manages events
3430>
3531> ` React-Query ` manages Network-states
32+ >
33+ > ` States ` manages UI-states
You can’t perform that action at this time.
0 commit comments