- CRA
- hierarchy
- React.createElement(type,props,children)
- ReactDom.createRoot
- JSX
- work with collection
- key
- use function
- edit function to <Component/>
- props
- hierarchy components
- fragment
- conditional rendering
- styled
- inLine style
- vanilla css
- module css
- composition class
- Classnames || clsx
- CSS in JS
- styled-components
- props
-
Class Component
-
Events
- Event delegation
- inLine clb Function
- clb function with context
- public values
- constructor && prototype
- SyntheticEvent Object vs Async
-
State
- update state with setState(update)
- prevState
- upper state
- onChange vs control form
- onSubmit
- class Form
- form reset
- add todo
-
Mounting
-
Updating
-
Unmounting
-
componentDidMount
-
componentDidUpdate(prevProps, prevState)
-
componentWillUnmount
-
close modal by ESC
-
set data to localStorage
-
shouldComponentUpdate vs PureComponent
- http how to use
- architecture
- search -> app -> content
- validation search with react-hot-toast
- componentDidUpdate in content
- fetch in content
- loading in content
- destructuring state
- http errors
- pattern stateMachine
-
useState
-
useState nothing save state
-
useState one State = one useState
-
useState convert class to hooks
-
useEffect
-
useEffect first render
-
useEffect every render
-
useEffect clear after render
-
useEffect first render
-
useEffect update on any change
-
edit class to huk
-
if return
-
useMemo
-
complexCompute
-
useEffect vs useMemo
-
useCallback
-
Profiler
-
useContext
-
Provider
- BrowserRouter
- Routes & Route
- Link to
- Outlet & nested routes
- use index
- useParams
- useSearchParams
- BackBtn with useLocation
- location.state
- lazy & suspense
-
how it works
-
install redux
-
function createStore
-
function reducer
-
reducer default value
-
getState
-
dispatch
-
switch
-
redux connect to react
-
install react-redux
-
Provider
-
useSelector
-
useDispatch
-
set step
-
...state
-
reducer.js
-
actions.js
-
types.js
-
initialState
-
combineReducer
-
redux-devtools
-
redux-toolkit
-
createAction
-
createReducer
- action.toString()
-
configureStore
-
combineReducer not use
-
selectors
-
redux persist
- combineReducer
- serializableCheck
- create persist for one state
- persist back object
- whitelist
- how its work (Async Redux)
- create custom middleware
- create fetchNews
- create getNewsAction
- create newsReducer
- create newsSlice
- createAsyncThunk
- add extraReducers to newsSlice
- payloadCreator(arg, thunkAPI)
- edit ContentInfo with getNewsThunk