Create a Custom React Hook to Handle Form Fields

Link to chapter -

Question-- How would you go about clearing all of the fields in that custom hook? For example, you could have a form where a user could want to submit multiple times; how could you use this hook to easily set each field to an empty string?

That’s a good question. For that I would return another function with the hook that resets the state to the initialState.