DEV Community

Discussion on: Server-Side Rendered Real-time Web App with Next.js, AWS Amplify & GraphQL

Collapse
scorpian555 profile image
Ian

ts -v = 3.6.2
reactjs -v = 16.9.2

Line 64 in my file, on the add() method definition (at add.payload.name), was getting a "cannot find name 'currentTodo'" error.

Changed name: currentTodo => name: state.currentTodo
Then, deleted state.currentTodo entirely from

add method

works ok now... I'm brand new to typescript & React Hooks so not sure if those changes will bite me later but so far good project to learn these...

Collapse
rakannimer profile image
Rakan Nimer Author

Thanks for reporting that, I updated the post to fix it 👍