react-scrollbars-custom
react-scrollbars-custom copied to clipboard
Not working with react 18 and next js 12 getting element ref error
What is the current behavior?
Steps to reproduce it and if possible a minimal demo of the problem. Your bug will get fixed much faster if we can run your code and it doesn't have extra dependencies other than react-scrollbars-custom. Paste the link to your JSFiddle or CodeSandbox example below:
What is the expected behavior?
A little about versions:
- OS:
- Browser (vendor and version):
- React:
react-scrollbars-custom:- Did this worked in the previous package version?
Same error here.
I have same error. Please, fix it!
This issue happens due to React.StrictMode. Temporary fix is to disable it.
I have same issue. For me helped change reactStrictMode to false in next.config.js, but this should be fixed in different way.
Error:
Error: Element was not created. Possibly you haven't provided HTMLDivElement to renderer's `elementRef` function.
https://github.com/xobotyi/react-scrollbars-custom/blob/6f9e391f30e191f20cf7603201ce7664e12dde01/src/ScrollbarTrack.tsx#L22-L30
The latest release in the repository is from 2018 and the latest code push is from 2021 I think this repository is unmaintained.
To solve these problems use another library: react-custom-scrollbars-2
It is practically the same but you have to change the name of some parameters and it seems to have more maintenance and updates.
I'm trying to cut the time to rework the package atm
Any updates on this issue ? Still presents on the latest release @xobotyi
Wondering if any updates that may fix the issue are upcoming? @xobotyi
facing this problem as well @xobotyi
Facing the same issue...
rsc.esm.js:871 Uncaught Error: Element was not created. Possibly you haven't provided HTMLDivElement to renderer's `elementRef` function.
same here
I'm sorry, any updates? @xobotyi
Plus one, also reproduced this, albeit without Next.js, rather with a client side application using React 18 and Vite 5.1
Same here, with react 18 and Vite 5.1. Any updates on this issue ?