state object ๋ณ€๊ฒฝ

ยท React
Redux store์— ์ €์žฅ๋œ state๊ฐ€ array,object ์ž๋ฃŒ์ธ ๊ฒฝ์šฐ, state ๋ณ€๊ฒฝ์„ ์ข€ ํŽธ๋ฆฌํ•˜๊ฒŒ ํ•  ์ˆ˜ ์žˆ๋‹ค ๊ทธ ๋ฐฉ๋ฒ•์„ ์•Œ์•„๋ณด์ž redux state๊ฐ€ array/object์ธ ๊ฒฝ์šฐ ๋ณ€๊ฒฝํ•˜๋ ค๋ฉด let user = createSlice({ name : 'user', initialState : {name : 'kim', age : 20}, reducers : { changeName(state){ state.name = 'park' } } ์ง์ ‘ state๋ฅผ ์ˆ˜์ •ํ•ด๋„ ๋ณ€๊ฒฝ์ด ์ž˜ ๋ฉ๋‹ˆ๋‹ค array/object ์ž๋ฃŒ์˜ ๊ฒฝ์šฐ state๋ณ€๊ฒฝ์€ state๋ฅผ ์ง์ ‘ ์ˆ˜์ •ํ•ด๋ฒ„๋ ค๋„ ์ž˜ ๋˜๋‹ˆ๊นŒ ์ง์ ‘ ์ˆ˜์ •ํ•˜์‹ญ์‹œ์˜ค. ๋งŒ์•ฝ,๋ฒ„ํŠผ์„ ๋ˆŒ๋ €์„๋•Œ ๋ณ€๊ฒฝํ•˜๋ ค๋Š” ์ž๋ฃŒ์˜ +1์„ ํ•ด์ฃผ๊ณ  ์‹ถ์œผ๋ฉด? let user = createSlice..
becky(์ง€์€)
'state object ๋ณ€๊ฒฝ' ํƒœ๊ทธ์˜ ๊ธ€ ๋ชฉ๋ก