My latest project is a recipe app called Forkify where I am utilizing JavaScript, npm, Babel, Webpack, and a custom API for data retrieval.
API URL
Search Example
Get Example
The app displays recipes with their required ingredients on the screen. Additionally, there are two buttons, + and -, to adjust servings which in turn updates the serving size and ingredients accordingly.
For better understanding, below are screenshots and code files:
index.js
[Code snippet]
recipeView.js
[Code snippet]
Recipe.js
[Code snippet]
searchView.js
[Code snippet]
base.js
[Code snippet]
Screenshots:
Landing Page
https://i.sstatic.net/AXrX7.png
Entering search query as pizza
https://i.sstatic.net/eoMig.png
Results of the search query
https://i.sstatic.net/DGxsJ.png
Selecting Recipe from the list and showing default values of ingredients and servings
https://i.sstatic.net/aSdbx.png
Issue: The + and - buttons should adjust the ingredients and servings but currently they only change the servings. Ingredients display '?' instead of updating. Looking for a solution.