Add limit to the Api search

  1. Some images were not showing up
  2. Rendering the API results was too much and started filling up the screen.
const [limit, setLimit] = useState(8)
foodAPI.slice(0, limit ? limit : foodAPI.length).map((result) => (// render information here))

--

--

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store