I'm a beginner web developer and coder and just want to show this little work-in-progress Pokemon app I'm building to help me learn React and API integration
I am currently trying to build a search component so users can search for Pokemon (since it is currently paginated with 20 per page.) I'm having some difficulty figuring it out, but I'm making progress.
All the information is auto-populated. It's probably an easy thing for seasoned developers, but I'm proud to have linked the card colors, types and backgrounds to their relevant Pokemon.
Edit: search function is working now! But I I need to add "toLowerCase()"... And add prefix to the type images of some types. Otherwise, it's working decently! The search field works in real-time, so the page is a little sluggish to load. You can search by Name, ID, Type or Ability, just start typing and your results will appear.
I opted for a single search field for simplicity and to condense the page. I can add filters, but I like it this way for now.
Next I am adding a click-to-zoom on the cards, and when they fill the screen, additional info will populate the card, and even more info on the back.
Edit 2: Instead of making click to zoom, I added a drop-down menu to change sprites between all generations. Maybe now I'll add click to zoom!
Nice work so far, keep it up! Going to another page makes the whole page flash with "Loading" - think about how you can send the next request without re-rendering into that 'loading' state each time.
Good work, interesting to see how you have made it work with limited additional libraries (i.e. react-query, next etc...), and interesting to see how all the catches can lead to callback hell....
I'm using https://pokeapi.co/api/v2/pokemon as the api. I can grab all the names but that seems very inefficient and had put a lot of load when calling it.
I'm looking at just making an array of Pokemon names to exist within the app, and search through that and then call the specific endpoint using that name.
Also, I don't expect anyone to help out, I really just wanted to show it to someone! But any comments, suggestions etc are greatly appreciated. I have less than 3 or 4 months experience with JavaScript