-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Feat: React 19 Upgrade #2363
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
base: next
Are you sure you want to change the base?
Feat: React 19 Upgrade #2363
Conversation
feat: Bumped deps and refactored usages of forwardRef
|
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
👀 |
@joshuaellis apologies for reaching out directly, but if you have some time, could you please take a look at this PR? We'd really appreciate your review when it’s convenient for you. Thanks a lot! |
Is @joshuaellis the only person who can review this? Would be great to get this in and not have it end up like the other attempt at upgrading to React 19 |
Yeah... I was hoping that the fact this PR passed all the tests would mean it'd get reviewed sooner rather than later. At this rate someone may as well fork this library fully and re-distribute it. Shambolic from the maintainers if I'm honest |
Hey, firstly – sorry I recently started a family & I also have a FT job so unfortunately, open-source software is taking a back seat. Secondly, thanks for the PR! Here's some follow up questions:
Also, some other things i think we're missing from this is:
Otherwise, this looks super promising! |
Appreciate the reply, great to hear from you. Congratulations on the family news! I'd be happy to test out those changes regarding older version of React once I get the opportunity. The context change is breaking due to the nature of changing the Provider to be separate from the instantiated context itself. It follows the Context Provider pattern; Here's an article around it - I find it to be way better for DX. If you'd prefer it to remain as it was previously, it may involve a bit more in-depth tinkering due to the type errors generated from the current approach. I'm not torn on either approach - As long as the resulting code is readable and maintainable for future development. I can take a look at refactoring the types and structure to potentially allow for a single object to safely contain all the necessary functionality. In terms of my comment about the maintenance of this project, it's more targeted to the complete lack of communication towards the community. The main issue attached to this PR has hundreds of people waiting for this change, after you had mentioned about updating it in December. Granted I appreciate your new family changes meant you were not available, but I do think that the lack of communication severely impacted this whole process. As I was forced to make this change due to a work dependancy on a 1st party library, I cannot guarantee that I'll have time to look at this in the short term. I'll do my best. Hopefully I can have time next week to delve deeper into the good points you mentioned. I'll try to keep this PR up to date with that |
tbf i'm kind of happy to remove it, I don't think anyone uses it. Also it breaks everything in RCS for imo not a lot of gain...
sounds good! ✨ |
Just had a read through some other known React 19 OSS projects - They seem to be using |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi, just a quick first pass. I stopped on the forwardRef as it has already a big impact. Tell me your though.
Right people - I've now made these changes:
|
Would be awesome if this could be merged in!, only thing missing for my company to move to react 19, any way I can help? |
First of all, thank you for the pull request! Issue Example export function RefAnimated() {
const ref = useRef<HTMLButtonElement>(null);
const [_, setCounter] = useState(0);
const Button = animated('button');
return (
<Button
ref={ref}
onClick={() => setCounter((v) => v + 1)}
>
With ref (width:{' '}
{ref.current?.getBoundingClientRect().width || 0}px)
</Button>
);
} When clicking the button, the width should update, but currently it does not behave as expected. |
Hey! Thank you for taking the time to test this - As mentioned in a comment left after you, I had missed a forwardRef on the Thank you! |
Hey @joshuaellis - Apologies for the direct ping! Just wondering of next steps for this? Are you happy to override the reviewing/approval or do I need to wait for re-review from the previous reviewers? Thanks mate! |
I'm OOO till Tuesday, but if the CI passes we can cut a beta, people can test it and report back any issues? Give it a couple of weeks before going to stable. |
Sounds like a plan! The CI is currently failing early due to me not pushing an updated lock (post updating the peer deps). I'll update that today - Then on tuesday we can see about doing that beta release! Thank you EDIT: Have pushed that lock file fix - Hopefully will let the CI pass properly (Can't tell until we try it!) |
glorious PR! I've watched and hoped for a long time and just want to say thanks. I'm checking out this branch and giving it a look just in case |
Thanks for making this update! Is there a beta version now to test with? |
Why
Closing #2341
What
Main changes:
forwardRef
- As per the React docs, will be fully deprecated in future.ref
fields with the valid React Types - Any polymorphic components were set asany
for theRefObject
generic.useRef
which were missing inits.SpringContext
to resemble a more sensible Context structureChecklist
ref
fieldsuseRef
Additional Comments
This was based on this PR: #2349
As the PR and issue have been open for a good while now, it's obvious that no further development was going to happen - I'm currently blocked by this library, so I thought it'd try and help with moving this forward.
PR Diff
I'm unsure as to why the diff is heavily focused on formatting changes - I was sure to run prettier via the NPM script before submitting this PR. Happy to outline all the direct code changes if necessary.