AnnaHellqvist / Technigo-9-20-Happy-thoughts

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Happy Thoughts 💖

This project was to make a kind of Twitter App in React by fetching and posting to an API. The user can post and like happy thoughts.

The problem

Tech I've used / What I've practiced

  • React.js / State and Effect hooks
  • JavaScript
  • JSX
  • API

The goal was to practice using React state and effect hooks while fetching and posting data to an API. I started with the list of messages, fetching from the API and mapping through the data to create the list. The data is sorted and messages with no input are filtered out. I continued to create the input form in which the user can post their happy thoughts. The submit button is disabled if the user puts in too many/few characters and there is a counter to show the user how many characters they have used. Finally I added a counter for how many individual posts the user has liked. I did this using a state hook with an array that stores the id of the liked post. If I had more time I would make individual css files for the components and made it more responsive.

View it live 🎉

https://annas-happy-thoughts.netlify.app/

About


Languages

Language:JavaScript 65.1%Language:CSS 26.2%Language:HTML 8.7%