Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/sunyoungkwon/react-class-vs-func
π» μνμ½λ©-React class vs function style κ°μλ₯Ό μκ°νλ©° μ€μ΅ν λ΄μ©
https://github.com/sunyoungkwon/react-class-vs-func
react react-hooks
Last synced: about 2 months ago
JSON representation
π» μνμ½λ©-React class vs function style κ°μλ₯Ό μκ°νλ©° μ€μ΅ν λ΄μ©
- Host: GitHub
- URL: https://github.com/sunyoungkwon/react-class-vs-func
- Owner: SunYoungKwon
- Created: 2020-11-11T05:25:02.000Z (about 4 years ago)
- Default Branch: master
- Last Pushed: 2020-11-18T10:02:27.000Z (about 4 years ago)
- Last Synced: 2023-03-06T07:14:15.765Z (almost 2 years ago)
- Topics: react, react-hooks
- Language: JavaScript
- Homepage:
- Size: 195 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# [μνμ½λ©] React class vs function style
## μμ λ΄μ©
React μ»΄ν¬λνΈλ **class**μ **function** λ κ°μ§ λ°©λ²μΌλ‘ μμ±ν μ μλ€.
class λ°©μμ Reactμ λͺ¨λ κΈ°λ₯μ μ¬μ©ν μ μμ§λ§ ν΄λΉ λ¬Έλ²μ λͺ¨λ μμμΌνλ€. function λ°©μμ κΈ°μ‘΄ javascriptλ₯Ό μ¬μ©νλ μ¬λλ€μκ² μ΅μνκ³ κ°νΈνμ§λ§ stateλ₯Ό λ§λ€κ±°λ lifecycle APIλ₯Ό μ¬μ©ν μ μμ΄ μμ μ»΄ν¬λνΈκ° μν€λ μΌλ§ ν΄μΌ νλ€. νμ§λ§, **hook**μ΄ λμ λλ©΄μ function λ°©μλ λ΄λΆμ μΌλ‘ μν(state)λ₯Ό λ€λ£¨κ³ , λΌμ΄νμ¬μ΄ν΄μ λ°λ₯Έ μμ μ μ μν μ μμ΄μ‘λ€. κ·Έλ¬λ©΄μ ν¨μνμ κ°νΈν¨μ κ·Έλλ‘ κ°μ§λ€.
μνμ½λ©μ [**React class & function style coding** μμ ](https://opentutorials.org/module/4600)μ κ°μ μμ μ νλ μ»΄ν¬λνΈλ₯Ό κ°κ° classμ function λ κ°μ§ λ°©μμΌλ‘ μμ±ν΄λ³΄λ©° μλ‘μ μ°¨μ΄μ μ μκ³ μ΄ν΄νκΈ° μν κ°μμ΄λ€.
[μμ λ΄μ© μ 리](https://sunnyk.tistory.com/29)