Skip to content

React 19 #5

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

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open

React 19 #5

wants to merge 2 commits into from

Conversation

bernaferrari
Copy link
Contributor

@bernaferrari bernaferrari commented Dec 13, 2024

Right now I have a project (completely not a magic patterns competitor, but I can't show because it isn't working) that is failing due to React 19 somehow being injected and being mixed with Radix (Tabs, Radio and ScrollArea seem specially affected).

I don't know if this will solve, since there is no way to test, but seems like the most promising thing I can do.

My previews started mysteriously failing last week (React 19? Coincidence?) and Chrome errors also seem to point to React 19:

TypeError: Cannot read properties of null (reading 'useCallback')
at R.useCallback (react.production.js:485:33)
at r (composeRefs.tsx:31:28)
at ScrollArea.tsx:87:26

So let's hope this works. This iFrame is an example of my use-case, but we are doing other things now, so it is mostly a project in maintenance:
example-iframe.html.zip

@alexdanilowicz
Copy link
Contributor

Hey @bernaferrari — so internally at Magic Patterns we use shadcdn but we use it alongside React: "^18.3.1" - so unfortunately we cannot bump here yet.

In the spirit of simply wanting to solve your issue: it might make sense for you to fork this repo and start publishing your own "shadcdn" - just because, to be totally honest, can't really prioritize testing / publishing a new version of shadcdn at this exact moment... can maybe look in a few days.

hope that makes sense. lmk if i can be helpful in any other way. just trying to be realistic + get a solution for you ASAP.

@bernaferrari
Copy link
Contributor Author

I used React 18 from jsdelivr to render everything and that worked until last week. Now, somehow, I guess if you have shadcdn alone it uses React 19 sometimes. Super weird. I'm not sure I'm smart enough to do what you are doing (and I guess your new package is also not public), but if you ever update to React 19, this PR is ready (else, feel free to close).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants