일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
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 | 31 |
- getUTCDate
- Javascript
- background setInterval
- React API 참고서
- Nextjs React 18
- React 고급 안내서
- Babel
- 고급안내서
- background tab
- React18
- background: url
- React 18
- Next13
- CSS
- hook
- React 고급안내서
- react
- notFound()
- react hook
- Programmers
- codingtest
- background setttimeout
- react-helmet
- Render Props
- Nextjs
- React 공식문서
- context
- RTK Query
- next13 head
- React 18 Nextjs
- Today
- Total
akjfal
주간 이슈(2주치) 본문
배열 속 객체의 데이터 하나를 변경해야 하는 문제 발생
해결법
const Plus=(i)=>{
const amount = tempOptionList[i].amount+1;
const tempOption = {id: tempOptionList[i].id, option: tempOptionList[i].option, price: tempOptionList[i].price, stock: tempOptionList[i].stock, amount};
tempOptionList[i] = tempOption;
restList = tempOptionList.concat(restList);
dispatch(calOptionAmount(restList));
}
새로운 객체 생성 후 기존 배열에 넣어 주는 방식 채택 -> 얕은 비교가 아닌지라 redux의 갱신이 이루어진다
* 에러
https://github.com/rt2zz/redux-persist/issues/988
non-serializable value error · Issue #988 · rt2zz/redux-persist
Hi folks 👋, I just installed the redux-persist in a project still in its early stages and I'm facing this error message in the console as first thing when the page loads. I haven't done muc...
github.com
원인 : redux-starter-kit과 같이 사용시 발생
해결 방법
const store = configureStore({
reducer: rootReducer,
middleware: [...getDefaultMiddleware(), sagaMiddleware ]
});
이 코드를
const store = configureStore({
reducer: rootReducer,
middleware: [ sagaMiddleware ]
});
이렇게 고치기
인자받기를 prop로 변경하기
생성하는 객체에서 ...Market.delivery
이 표현이 빠져서 나머지 단어 처리가 안되었다.
Bar={Bar} => Bar={<Bar/>}
배열은 그자체를 건들지 못한다.
잘랐다가 다시 만드는등의 행동을 해야한다
Error while sorting array of objects Cannot assign to read only property '2' of object '[object Array]'
I'm having array of objects where object looks like this (values change): { stats: { hp: 2, mp: 0, defence: 4, agility: 11, speed: 6, streng...
stackoverflow.com
아니면 이런 방법도 있다
const tempOption = tempProduct.data.option.map((item, index) => {
if(index !== arraynum){
return item
}
return{
...item,
[e.target.name]: e.target.value
}
})
yangshun/front-end-interview-handbook
🕸 Almost complete answers to "Front-end Job Interview Questions" which you can use to interview potential candidates, test yourself or completely ignore - yangshun/front-end-interview-han...
github.com
요거 정리
멘토링
한 변수를 다르게 사용하면 발생