ALOHA CLASS
/
Front-End
/
React
Search
Share
React
React μκ°
Node.js μ€μΉνκΈ° (Windows)
β£
1. wingetμΌλ‘ Node.js μ€μΉ
winget install OpenJS.NodeJS
React κ°λ°νκ²½ μ€μΉ
React μμνκΈ°
React νλ‘μ νΈ μμ±
1.
vite λ‘ νλ‘μ νΈ
2.
npx λ‘ νλ‘μ νΈ
3.
λͺ¨λ μ€μΉ
React νλ‘μ νΈ
node_modules λΉ λ₯Έ μμ
β’
rimraf λͺ¨λ μ μ μ€μΉ
npm install -g rimraf
β’
node_modules μμ λͺ λ Ή
node_modules μμ
React Extension
Vite & React
JSX
Element
Component
State
Props
Lifecycle Methods (μλͺ μ£ΌκΈ° λ©μλ)
μ»΄ν¬λνΈμ μλͺ μ£ΌκΈ° λμ νΉμ μμ μ μ€νλλ λ©μλ
Mounting
Updating
Lifecycle
Hook
Router
React Style
Context
Redux
Throttle (μ°λ‘ν)
μ΄λ²€νΈκ° μ무리 λ§μ΄ λ°μν΄λ μ§μ ν
delay
κ°κ²©λ§λ€ λ± ν λ²λ§ μ€νλ©λλ€.
λΉμ
Throttle
React Custom Hook (컀μ€ν ν )
1. 컀μ€ν ν μ΄λ?
ν΅μ¬ κ·μΉ
Custom Hook
Vite νλ‘μ(Proxy) μ€μ κ°μ΄λ
1. νλ‘μ(Proxy)λ?
νλ‘μλ
ν΄λΌμ΄μΈνΈμ μλ² μ¬μ΄μμ μμ²μ μ€κ³νλ μ€κ° μλ²
μ λλ€.
[λΈλΌμ°μ ] β [Vite Dev Server (νλ‘μ)] β [λ°±μλ API μλ²] :5173 :5173/api/... :8080
Proxy