the search method should use fetch to call the backend to get the list of images. unless the component is going to host the image list, not sure way the image url is in local state.
also as you are using import and export (requiring a transpile) , not sure why you are not using jsx syntax.
Member
18 Points
226 Posts
Where to connect to server in this search code?
Jan 05, 2021 06:47 PM|SaeedP|LINK
Hello,
I want to make a search bar at the top of the page that returns the tile images. Where should I connect to my database and handle the back end?
All-Star
57874 Points
15505 Posts
Re: Where to connect to server in this search code?
Jan 05, 2021 08:43 PM|bruce (sqlwork.com)|LINK
the search method should use fetch to call the backend to get the list of images. unless the component is going to host the image list, not sure way the image url is in local state.
also as you are using import and export (requiring a transpile) , not sure why you are not using jsx syntax.