Notice
Recent Posts
Recent Comments
Link
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | 2 | |||||
3 | 4 | 5 | 6 | 7 | 8 | 9 |
10 | 11 | 12 | 13 | 14 | 15 | 16 |
17 | 18 | 19 | 20 | 21 | 22 | 23 |
24 | 25 | 26 | 27 | 28 | 29 | 30 |
Tags
- HTML
- node.js
- UI
- js
- css:position
- Temporal dead zone
- node
- CSS
- TypingEffect
- Empty
- es6
- innerText
- beforeinput
- nodeValue
- Event
- for loop
- innerHTML
- textContent
- yet
- keyup
- a11y
- Review
- keyboardEvent
- react
- modal
- addEventListener
- Dom
- dotenv
- ES5
- javascript
Archives
- Today
- Total
the murmurous sea
React state vs. Redux state 본문
https://spin.atomicobject.com/2017/06/07/react-state-vs-redux-state/
"Redux manages state and state transformations and is often used with React, but React has its own concept of state."
"Even if you choose to use Redux in your project, you will still need to make decisions on how much of your data is stored in Redux."
React | Redux |
stored locally within a component. | state is stored globally in the Redux store. |
Short-term state: Data that will likely change rapidly (eg. form input data, filter a list of items, show/hide items) |
Medium-term state: Data that will stick around while the user navigates. Data loaded from an API, or any changes that you want to be persisted up until a page refreshes. (eg. submitting a form, updating profile info) |
Long-term state:
This is state that should be persisted between refreshes of the page or between separate visits to the page.
Since the Redux store will be created anew when refreshing,
this type of data should be stored somewhere else(A database on a server or local storage in the browser).
https://medium.com/@dan_abramov/you-might-not-need-redux-be46360cf367
'#dev > 개념정리' 카테고리의 다른 글
How to kill a port (0) | 2021.04.16 |
---|---|
app.get() vs. router.get() (0) | 2021.04.15 |
UX/UI: Branding (0) | 2021.01.26 |
UX/UI: what makes good web design (0) | 2021.01.23 |
UI: Responsive layout grid (0) | 2020.10.28 |
Comments