selection
selection copied to clipboard
Issues with React 19
What is the problem?
Hello, I have issue with using this package (React version with React 19).
Error: Cannot read properties of undefined (reading 'ReactCurrentDispatcher')
at eval (viselect.mjs:250:15)
at gr (viselect.mjs:661:4)
at eval (viselect.mjs:663:26)
What is the current behavior?
The current behavior is that it throw with the exception I pasted above.
I've done some ressearch and it appears that is the problem when we use multiple React Version together. So, I've copy/pasted the file SelectionArea.tsx directly into my project and installed vanilla package directly, and it worked ! (and that's ok for me).
I think a good way (and modern way) to distribute the React package should be to only transpile the tsx to jsx. I believe all people that use react have already a bundler and, the file would be build and run with the current version of React.
Anyway, it works and it does exactly what I was looking for thank you !
Please provide the steps to reproduce and create a CodeSandbox.
What is the expected behavior?
Your environment:
React 19 isn't released as stable yet.
I second this @AugustinasMK, I'm currently only building this against stable versions.
maybe we can anticipate a little bit and not wait for the user to complain to start to think to a fix
I have the same issues with React 19
Huh, I just tested this with React v19 by upgrading all dependencies and opening the react demo and it worked flawlessly. Can anyone confirm that because otherwise it might be something else not related to this library. There are no deprecated things used from react at the moment.
Huh, I just tested this with React v19 by upgrading all dependencies and opening the react demo and it worked flawlessly. Can anyone confirm that because otherwise it might be something else not related to this library. There are no deprecated things used from react at the moment.
look at this demo, it can't work.
https://stackblitz.com/edit/react-tmsycz8r?file=package.json