I cant seem to clear my string in my react hook state

Hi Martin, thanks for the response, when it throws an error but shows nothing in the console, the error reads

error("State updates from the useState() and useReducer() Hooks don't support the " + 'second callback argument. To execute a side effect after ' + 'rendering, declare it in the component body with useEffect().');