Pagination
Hi everyone
Anyone already did pagination or infinite scrolling on Solid?
If yes, can share how to do it please?
I found a primitive for that, but I can't use the data fetching I have with the
createInfiniteScroll
.
This is my second attempt:
Where The getProjects
is:
Thanks 🙏8 Replies
Anyone can help me please?
Got you covered: https://primitives.solidjs.community/package/pagination
Solid Primitives
A library of high-quality primitives that extend SolidJS reactivity
I'm trying to use that
Any problem to do this:
I try to use
createInfiniteScroll
but didn't workThe problem here is that when totalOfProjects changes, pages is not updated.
wrap the options in a function to make them reactive:
createPagination(() => ({ pages: ... }))
.
I haven't written infinite scrolling, so I need to have a closer look once I have some time.Thanks 🙏
happy to help. The use of reactivity in createPagination was a fun exercise. It is as fine-grained as possible.
Is my first time using Solid, so thank you for your help and sorry for any noob question
I'm happy to help, so feel free to ask whenever you have any question.