Create a Custom React Hook to Handle Form Fields

Link to chapter - https://serverless-stack.com/chapters/create-a-custom-react-hook-to-handle-form-fields.html

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.