-
Notifications
You must be signed in to change notification settings - Fork 46.9k
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
Investigate why select._wrapperState.initialValue is necessary #13410
Comments
Nominating @raunofreiberg for this, but I don't want to create work for them :) |
I want to say that this is an artifact of older defaultValue handling for selects? |
Removing it completely appears to have no effect on the test suite. |
@nhunzaker Can I take this one? This is my first time contributing to React Purely from reading the code, it seems like your assessment of initialValue not being used seems correct. Happy to investigate further |
Go for it! |
Hey @nhunzaker I raised a PR for the change #13412 |
Fixed by #13412. Thanks @kartiklad! |
Uncovered during @raunofreiberg's select work (#13389).
select._wrapperState.initialValue
is only ever assigned, never referenced. Can it be removed?Example:
https://github.com/facebook/react/blob/master/packages/react-dom/src/client/ReactDOMFiberSelect.js#L191
It would be great if someone could investigate this, and figure out if it can be removed.
The text was updated successfully, but these errors were encountered: