Founder of Skyward Digital, the UX Jamstack agency
Showing you how to:
๐ป Create excellent websites
๐ Evaluate and improve UX
๐งก Discover loyal users
๐จ๐ปโ๐ป he/him
I would call the API every time the name value changes (only on user request, ie submit) and then use array.filter to manage and thing with known results (dropdowns, checkboxes, etc).
Some other things to consider.
When you request data you could return only pages around the requested page. This means more calls (and is more work to build), but each result is smaller (50 results instead of 5000). Depends on how much you want to optimise things (this is quite extreme).
You could cache results for popular searches or previous searches both servers ide for quick delivery but also in the users browser if they've already searched for it (so you don't re-fetch results).
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
I would call the API every time the name value changes (only on user request, ie submit) and then use array.filter to manage and thing with known results (dropdowns, checkboxes, etc).
Some other things to consider.
When you request data you could return only pages around the requested page. This means more calls (and is more work to build), but each result is smaller (50 results instead of 5000). Depends on how much you want to optimise things (this is quite extreme).
You could cache results for popular searches or previous searches both servers ide for quick delivery but also in the users browser if they've already searched for it (so you don't re-fetch results).