Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Don't override ref property when not configured to.#2252

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Open
PSpSynedra wants to merge4 commits intoreduxjs:master
base:master
Choose a base branch
Loading
fromPSpSynedra:master

Conversation

@PSpSynedra
Copy link
Contributor

The current behavior ofconnect is to always pass along a ref property, event when the optionforwardRef was not truthy or preset.

This pull request

The error in the following use case is also fixed with this pull-request:

import WrappedComponent from '...'function HocComponent(props) {   const [wrapperRef, setRef] = useState(null)   // The current behavior of connect would override the ref!   return <WrappedComponent ref={setRef} {...props} />}export default connect(...)(HocComponent)

NOTE:
My initial intend was to remove the use ofReact.forwardRef(...) completely, but this would have broken the compatibility with React prior to version 19.

@codesandbox-ci
Copy link

codesandbox-cibot commentedAug 21, 2025
edited
Loading

This pull request is automatically built and testable inCodeSandbox.

To see build info of the built libraries, clickhere or the icon next to each commit SHA.

@PSpSynedra
Copy link
ContributorAuthor

PSpSynedra commentedAug 21, 2025
edited
Loading

Unfortunately I cannot get the "Test Published Artifact expo (pull_request)" to pass.
When I runyarn install with node-22.18.0 as suggested by some internet search results, my localyarn.lock does not get changed.

Can I run the failing test locally on my machine to fix the issue?
Any suggestions on how to fix this?

@netlify
Copy link

netlifybot commentedSep 15, 2025

Deploy Preview forreact-redux-docs ready!

NameLink
🔨 Latest commit27fd687
🔍 Latest deploy loghttps://app.netlify.com/projects/react-redux-docs/deploys/68c7ade9c0648e000833e342
😎 Deploy Previewhttps://deploy-preview-2252--react-redux-docs.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to yourNetlify project configuration.

Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment

Reviewers

No reviews

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

External property ref is always overridden with value undefined

1 participant

@PSpSynedra

[8]ページ先頭

©2009-2025 Movatter.jp