react scaffolding project
// install react, react-dom, typescript
npx create-react-app my-react --template typescript
bootstrap@5.0.0-alpha2 : https://v5.getbootstrap.com/
npm i bootstrap@next
react router
npm install react-router-dom @types/react-router-dom
react
typescript
mobx
- https://mobx.js.org/README.html
- https://mobx.js.org/react-integration.html mobx-react-light
- https://github.com/mobxjs/mobx-react-lite
mobx ex
class vs functino component
- https://velog.io/@sdc337dc/0.%ED%81%B4%EB%9E%98%EC%8A%A4%ED%98%95-%EC%BB%B4%ED%8F%AC%EB%84%8C%ED%8A%B8
- https://overreacted.io/ko/how-are-function-components-different-from-classes/
HoC
test
react-typescript
- https://velog.io/@velopert/create-typescript-react-component
- https://github.com/typescript-cheatsheets/react
react-mobx-typescript
cra (Create React App)
- https://github.com/facebook/create-react-app
- add ts : https://create-react-app.dev/docs/adding-typescript
- add router : https://create-react-app.dev/docs/adding-a-router
react-router
plyfill
production build
route based code splitting
mobx project structure
Stores
Domain Stores
stores the data which'll be needed in your app.
for ex. user data
View Stores
stores the data which'll be needed to present your app
for ex. loading, error variables
Models
Here you can define the data models
for ex- user model
Services
Here you can make services, api calls
Components
Container or Smart Component
Dumb or presentational component
atomic design