brmnmusic
@brmnmusic5054
Reviews Written
1
Average Rating
5.0
Posts
Q&A
optimistic ui ๊ตฌํ์ค ์ง๋ฌธ์ด ์์ต๋๋ค
์ ๊ฐ์๋ฅผ ๋ฃ๋ค ๋์น ๋ถ๋ถ์ด ์์๋ค์ shouldRevalidate false๋ฅผ ์ฌ์ฉํด์ ๋ก๋๊ฐ ๋์ง ์๋ ๊ฒ์ด๋ค์
- 0
- 2
- 306
Q&A
combineReducers์ฌ์ฉํ ๋ ์ค๋ฅ๊ฐ ์๊ฒจ์
combineReducers๋ฅผ ์ฌ์ฉํ๊ธฐ์ ๊น์ง(20๊ฐ ์๊ฐ๊น์ง)๋ ์๋์์ผ๋ ํด๋น๋ถ๋ถ์ ์ฌ์ฉํ์ ์๋ฌ๊ฐ ์๊ฒผ์ต๋๋ค
- 0
- 3
- 526
Q&A
combineReducers์ฌ์ฉํ ๋ ์ค๋ฅ๊ฐ ์๊ฒจ์
์ ๊ฐ ๊ฐ์ฌ๋ ๋ต๋ณ์ ์ ํํ๊ฒ ์ดํดํ์ง ๋ชปํด์ ๋ก๊ทธ์ธ ๊ด๋ จ ์ฝ๋๋ฅผ ์ฌ๋ ค๋ณด๊ฒ ์ต๋๋ค LoginForm.js ์ฝ๋ const LoginForm = () =>{const dispatch = useDispatch()const [id, onChangeId] = useInput('')const [pw, onChangePw] = useInput('')const onSubmitForm = useCallback(() => {console.log(id,pw)dispatch(LoginAction({id,pw}))},[id,pw]) ----------------------------------------------------user.js ์ฝ๋ export const LoginAction = (data) => {return{type:'LOG_IN',data:data,}} const reducer = (state = initialState, action) => {switch (action.type){case 'LOG_IN':{return{...state,isLoggedIn: true,user:action.data }} ์ด๋ ๊ฒ ์์ฑํ์๋๋ฐ ๊ฐ์๋ฅผ ๋๋ ค๋ด๋ ์ด๋๊ฐ ๋ฌธ์ ์ธ์ง ์ ๋ชจ๋ฅด๊ฒ ๋ค์..
- 0
- 3
- 526




