DEV Community

Discussion on: Implement Search Bar in React for Ecommerce Website

Collapse
msveshnikov profile image
Max Sveshnikov

Honestly, searching in constant array will not be a production case ๐Ÿ˜‰ In real world you have to use ElasticSearch or something like Algolia

Collapse
holdmypotion profile image
Rahul Author

THAT IS ABSOLUTELY TRUE!!
I would personally prefer Algolia for professional projects, because of two reasons:

  1. Developer experience
  2. I haven't tried ElasticSearch What do you prefer, though?

That being said, when I was learning the basics of react. I always used to use filter function for any kind of search-based functionality.
So I thought it might help!๐Ÿ˜