algolia / instantsearch

⚡️ Libraries for building performant and instant search and recommend experiences with Algolia. Compatible with JavaScript, TypeScript, React and Vue.
https://www.algolia.com/doc/guides/building-search-ui/what-is-instantsearch/js/
MIT License
3.73k stars 526 forks source link

Documentation Wrong for Instant Scroll Demo #6429

Closed mmorris8 closed 2 weeks ago

mmorris8 commented 2 weeks ago

🐛 Current behavior

https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/infinite-scroll/react/

hits is deprecated. The code flat out doesn't work if you copy it into a project. When was this last tested???

🔍 Steps to reproduce

Go to https://codesandbox.io/p/devbox/muddy-brook-nbdfm?file=%2Findex.html and try to build it. Doesn't work.

Live reproduction

https://codesandbox.io/p/devbox/muddy-brook-nbdfm?file=%2Findex.html

💭 Expected behavior

The demo above, linked from the page, won't even build. Again, when was the last time this was tested???

Package version

Irrelevant - Online Documentation is wrong.

Operating system

OSX Sequoia

Browser

Edge Latest

Code of Conduct

Haroenv commented 2 weeks ago

What do you mean it doesn't build? the example works for me perfectly fine. hits indeed should be changed to items, but for now both keys still work.

Build also seems to work:

Screenshot 2024-11-12 at 10 08 57
Haroenv commented 2 weeks ago

I've made a pull request in the documentation to fix the hits that was still documented to use items like in the rest of the document

This issue is closed now because the documentation is updated. If you have more questions please continue