ninamansster / project-happy-thoughts

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Happy Thoughts

In this week's project, I practiced React state skills by fetching and posting data to an API. It included the useState and useEffect.

We've built a simple API to collect 'happy thoughts'in a Twitter-like web app.

You can take a look at the web page here: https://ninamansster-happy-thoughts.netlify.com/

API documentation

Fetch recent thoughts

GET https://technigo-thoughts.herokuapp.com/

Create a thought

POST https://technigo-thoughts.herokuapp.com/

Like a thought

POST https://technigo-thoughts.herokuapp.com/THOUGHT_ID/like

I have learned: 🧠

  • How to use APIs in React, firing requests within useEffect.
  • How to put the result of API responses into React state to show in the page.
  • What it's like to work with an API which you both send and receive data from.

About


Languages

Language:JavaScript 48.1%Language:CSS 34.7%Language:HTML 17.2%