-
Notifications
You must be signed in to change notification settings - Fork 325
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
TypeError on latest Next.js #393
Comments
I suppose I am not surprised since the project has not updated in over two years. I had not noticed before making this issue. |
I have no issue integrating the component in my nextJS project w/ TS and WP backend. I just finished implementing the scroll and came here to check for any issues again. |
Hm, all I did was create new app, install the component, add this to my
Are you using the latest Next + app router? Versions are posted at the top of the original post. (Also using node Here is the complete zip after doing the above. I tried again just now and reproduced the error. What versions of the different components are you using? |
Not sure if u are stil here but I replicated the error by copying and pasting your code on my next project. Then I compared with my own implementation. Adding "use client" at the top seems to fix it. |
Next.js
13.5.3
React
18.2.0
react-infinite-scroll-component
6.1.0
node
20.7.0
(also tried18.8.0
and16.19.1
)TypeScript compiler
5.2.2
I was attempting to integrate the
InfiniteScroll
element into a simple React/Next.js project and found strange behavior even in the simplest case. Here I am attempting to feed the component a fixed list of simple post data in the index routeapp/page.tsx
of a new Next.js project (using the app router):Then, when running
node run dev
the build fails somewhat cryptically:Am I doing something blatantly wrong here or is the component just incompatible with the latest Next.js? I could not find any authoritative answer on compatibility.
The text was updated successfully, but these errors were encountered: