Skip to content

Conversation

romain-trotard
Copy link
Contributor

@romain-trotard romain-trotard commented Sep 10, 2025

Hello :)

Why

This is a PR to fix the issue that I've opened #2395

What

There are some problems after the change made here https://github.com/pmndrs/react-spring/pull/2373/files#diff-3dce88b788d6e5008705461509e6c3a027695ca9a198d918b9d9c4800d4d2181R441 when working with React 18

Checklist

ps: the command yarn changeset:add does not seem to work. It seems yarn changeset adds the changeset file, should I add it? (I see that some PRs are merged without changeset file)

Not working changeset command
  • Documentation updated
  • Demo added
  • Ready to be merged

Copy link

changeset-bot bot commented Sep 10, 2025

⚠️ No Changeset found

Latest commit: 1454efc

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

Copy link

vercel bot commented Sep 10, 2025

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Preview Updated (UTC)
react-spring Ready Ready Preview Sep 10, 2025 3:17pm


if (isLegacyReact) {
if (isLegacyReact && elem && elem.type) {

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry but do you know why we also need to check elem.type? It seems to me that && elem should be enough. Am I missing something?
I know there’s already the same check earlier; but i do not understand why it is necessary.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yep I think elem should be enough. But to be completely iso with the previous code I put elem.type.

Maybe someone knowing better the codebase can tell why there is the condition elem && elem.type a little further in the codebase

@dimitris-tsetsonis
Copy link
Contributor

@romain-trotard this should be similar to my PR here #2394 which has a beta version. Would be create if you could verify it too and we can merge one of the 2 PRs

@romain-trotard
Copy link
Contributor Author

@dimitris-tsetsonis I've just tested the 10.0.3-beta.0 version, and it works well on my project.
I close my PR ;)

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.

3 participants