Project 11, Happy-Thought form, build during Technigo Bootcamp fall 2019!
In this week's project, we used React to build a form that is fetching and posting data to an API. Like a version of twitter with only "happy" thoughts.
First I decided how I should structure the form, based on the design we were given. I decided how many components I should use and how to structure them. I wanted one that only dealt with the POST method of the thoughts, where I would submit my own thoughts, and then one component with the GET method when calling the API to fetch all the posts that others submitted and also where I would build the function for posting my likes.
I used the useEffect hook to perform the different actions when the components I created mounted, unmounted, and when they changed the state, and useState for setting the new state depending on the new value.
If I would have more time, I would have changed the text in the submit form, to "reset", at the same moment hitting the submit button.
This is where you can find my deployed project: https://myhappythoughts.netlify.com/