DEV Community

Discussion on: Real Time Searching In ReactJS

Collapse
vu profile image
Vu

As I see, it's not real time.
What happen when you have lots of items, you need request the server to get them, so it will request every time you enter a character.
I think you should research a bit about 'debouncing' and ''managing server state"

Collapse
shubhamtiwari909 profile image
Mysterio Author

I don't know about fetching data from server and other server states , Its just a front-end part with Some JSON data
I will learn other topics later

Collapse
danwood profile image
Dan Wood

You can simulate it using Promise with a setTimeout.

Collapse
ats1999 profile image
Rahul kumar

Instead of denounce we can also use onBlur to request server.