Member-only story

React recipe search App

YvonneDev
3 min readDec 21, 2021

--

Photo by Dan Gold on Unsplash

Recently I am trying to find some React app to practice. All kinds of API make us easier to fetch data. I am using the API called EDAMAM. It upgraded to V2 .

  1. set up the react app

npx create-react-app <app-name>

2.App.js

search-form includes input text and a button.

when the input text is changing, the search value should change in State.

when clicking the button, the final search state is done, and it becomes query state .

To manipulate the data, you need to fetch the data from API.

For the API URL document

using async and await to get data.

Sign up for the account for the private API key, it’s free.

`https://api.edamam.com/api/recipes/v2?type=public&q=${query}&app_id=${APP_ID}&app_key=${APP_KEY}&random=true`

When you console.log() the data,showing below:

--

--

YvonneDev
YvonneDev

Written by YvonneDev

❤️Front-end Web Development self-taught *share what I learned*

No responses yet