// slices/recipes.js
...
try {
const response = await fetch('https://www.themealdb.com/api/json/v1/1/search.php?s=')
const data = await response.json()
dispatch(getRecipesSuccess(data.meals)) // Here, delve one layer deeper.
} catch (error) {
dispatch(getRecipesFailure())
}
...
view raw recipes.js hosted with ❤ by GitHub