GithubHelp home page GithubHelp logo

sofiavazs / project-happy-thoughts Goto Github PK

View Code? Open in Web Editor NEW

This project forked from technigo/project-happy-thoughts

0.0 0.0 0.0 375 KB

Project Happy Thoughts done during the Technigo bootcamp πŸ’Œ Our own version of Twitter, but only happy thoughts allowed! Built with React βš› and use React hooks to fetch and post data to an API

Home Page: https://happythoughts-sofia.netlify.app/

HTML 15.34% JavaScript 63.57% CSS 21.08%
react javascript jsx html css api

project-happy-thoughts's Introduction

Happy Thoughts πŸ’Œ

This week's project was to build a twitter like app called "Happy Thoughts" where you can see other people's happy thoughts, post your own and give a ❀️ to existing ones. We used the Happy Thoughts API πŸ’Œ for this and the main goals of this project was to learn about a Reactβš›οΈ component's lifecycle, how to react to changes in state/components using the useEffect hook, as well as, how top POST data into the API.

Planning & What I learned 🧩

  • My project consists of an App component that acts as the main parent component.
  • I have a Thoughts List component that shows all the messages posted by fetching the data from the API.
  • I then have a thought card component that that is mounted in the Thought list component and gets the data through props and a map() since thge data from the API is an array. In this component I also implement a "heart" functionality, where ther user is able to leave a heart to a specific message, this is done by having a function that handles the like function and adds a heart to a message by it's id.
  • Then I build the Thought Input component that does a distinct fetch POST request and we're able to add a new thought to the API. Once this happens, the page reloads so it's updated with the most recent thoughts and these are sorted to show the most recent ones at the top.
  • In this component I also implemented some validation, the button is disabled until the user reaches a certain amount of characters and the max length of message can't be greater than 140 characters. To make the user aware of the message length I also implemented a characters counter.

Tech ⚑️

  • JSX
  • React
  • Javascript
  • HTML
  • CSS

View it live πŸ”΄

https://happythoughts-sofia.netlify.app/

project-happy-thoughts's People

Contributors

sofiavazs avatar idlefingers avatar emolsz avatar dependabot[bot] 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.