S
SolidJSβ€’2y ago
Nin

Pagination Component

Hi all, I'm a beginning developer so bear with me while I go through these noob mistakes. I'm trying to utilize a React component called rc-pagination however when I follow their example my page stops loading and I get an error. I'm basically looking for an easy way to start using a proper pagination component similar to what Ant Design offers. The one I tried implementing: https://pagination-react-component.vercel.app/demo/more#more The error I'm facing after I've inserted my pagination component:
Uncaught (in promise) TypeError: Cannot call a class as a function
Uncaught (in promise) TypeError: Cannot call a class as a function
I'll happily use a different library which could create a similar experience.
9 Replies
Unknown User
Unknown Userβ€’2y ago
Message Not Public
Sign In & Join Server To View
Nin
Ninβ€’2y ago
I guess that’s my mistake for how I was introduced to Solid, as a replacement of Nextjs. Are there any solidjs pagination components already?
Alex Lohr
Alex Lohrβ€’2y ago
DEV Community πŸ‘©β€πŸ’»πŸ‘¨β€πŸ’»
Converting a React Component to SolidJS
Join me in this post as I migrate a React component with hooks to SolidJS. I recently have been...
Alex Lohr
Alex Lohrβ€’2y ago
I am working on a primitive that will give you an array with the props you need to build your pagination component from, so you can style them yourself, but that will take a bit. And to clear up the confusion: Solid.js is not a drop-in replacement for react like preact+compat is.
Unknown User
Unknown Userβ€’2y ago
Message Not Public
Sign In & Join Server To View
Alex Lohr
Alex Lohrβ€’2y ago
While it uses JSX templates and its primitives look similar to react's hooks, it is quite different under the hood.
Nin
Ninβ€’2y ago
Yep, realizing that right about now πŸ˜„
Unknown User
Unknown Userβ€’2y ago
Message Not Public
Sign In & Join Server To View
Nin
Ninβ€’2y ago
For sure haha, a lot of things make more sense now πŸ₯²