GithubHelp home page GithubHelp logo

project-happy-thoughts's Introduction

Happy Thoughts

In this week's project we created a site similar to Twitter, named ‘happy thoughts’ 💌. We practice React state skills by fetching and posting data to an API.

The problem

I started with fetching the api to get the existing data in App.js After that I created two more components, one for the message list and one for the form where the users can post their messages. When I had built the structure of the app I styled it according to the guidelines and built methods to post messages and likes to the API.

I also added some fun functions as animations when the user has written more than 140 characters, submits their message, error message and a loader. I used some great npm libraries for some of the functions:

moment to convert time
React-Toastify to add nice looking alert message to notice the user about an error React-loader-spinner to have a heart loder before the message list fetch is done.

I had a huge problem with connecting my heart button and the amount of likes, and also getting the date to be able to show how many likes a user has made compared to the existing likes. From my one to one with our code coach and some great googling I managed to solve it and got a great result.

Tech

  • React
  • JSX
  • API
  • useState
  • useEffect
  • localStorage
  • CSS

View it live

Write your lovely happy thoughts here: https://your-happy-thoughts.netlify.app/ BE: https://project-happy-thoughts-api-5j5sndevjq-lz.a.run.app/

project-happy-thoughts's People

Contributors

mariapogosjan avatar emolsz avatar dependabot[bot] avatar idlefingers avatar jenniedalgren avatar puj avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.