2
일부 자습서에서이 코드를 발견했습니다. 어떻게 작동합니까? 왜 저를 위해 일하지 않는가 (나는 SyntaxError: Unexpected token ...
를 얻는다)?개체 리터럴의 SyntaxError : 예상치 못한 토큰 ... "
const commentReducer = (state, action) => {
return {
...state, //error on this line
completed: !state.completed
}
}
오류를 나타내는 이미지에서 var가 const가 아니어야합니까? – miah
@miah 별 상관 없습니다. –