In this week's project, you'll be able to practice your React state skills by fetching and posting data to an API.
My first step was to create components and the needed CSS files. After that I connected the componets and tried to work from parent to child component, because I didn't want to make the same mistake as in the previous project.
By the time I reached the SingleThought.jsx, I realized that I could have made a separat component for the like function. Nevertheless, I continued to leave important code in the SingleThought.jsx.
My struggles began, when I couldn't figure out why I cannot post the thoughts. Hearing from the session and checking again in the material, it was the "headers" that was missing.
Another struggle was the timestamp for the posts. I saw that people were using the moment library to get the time. At first I couldn't make the code work, until I realized that I had to install the library. My assumption was, that the library was already intigrated.
This time I reached for some stretch goals, which I lately avoided to do.
If I had more time, I'd like to add a dislike button (old YouTube times).
My version of the happy thought page.
See instructions of this project