Converting React code from Lifecycle to Hooks

Writing a ToDoList web application following a tutorial written using the old Lifecycle method of React. I am using Hooks syntax instead, and am stuck converting some line into the new hooks syntax

:computer: Environment
Truffle v5.1.56 (core: 5.1.56)
Solidity v0.5.16 (solc-js)
Node v12.19.0
Web3.js v1.2.9

Here is the code for my ToDoList solidity file

:1234: Code to reproduce
here is the code am trying to replicate. Need some help converting the circled part

1 Like

Hi @Altaergo,

You may want to ask in a React focused community. Unfortunately I don’t know much about front end development, so can’t help you here.

1 Like

ok looking elsewhere