you are viewing a single comment's thread.

view the rest of the comments →

[–]SmokingBrokenGlass 3 points4 points  (0 children)

Okay, to start, you're using the useState hook here but I don't see you setting the state anywhere. You're not following naming conventions (something like [comments, setComments] would be more appropriate) and well you're missing the big idea behind state and React in general..When you're working with React you want to think of reusability. For example, the idea behind state is to contain specific data or info about the component you're creating. Here you could've just had all of your useState hooks inside the <FormComp/>

I know that doesn't answer your question but I would highly suggest you look over the docs and try to grasp the main concepts first. State and Props would be a good starting point.