-
Notifications
You must be signed in to change notification settings - Fork 47.6k
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
Make DOM wrapper component using lower-level primitives #3976
Conversation
@sebmarkbage Is this what you were thinking? |
value: value != null ? value : this._wrapperState.initialValue, | ||
checked: checked != null ? checked : this._wrapperState.initialChecked, | ||
onChange: this._wrapperState.onChange | ||
}); |
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.
This copying should be avoidable now that we don't have to adhere to a common pretty API but fine as a first step.
f802daa
to
503422b
Compare
@sebmarkbage r? If this is good then I'll convert the others too (in a separate PR). |
thx |
Introducing: a really lame version of composite components, right inside of ReactDOMComponent! Now ReactDOMInput isn't an actual component. This brings us closer to exposing DOM nodes as refs.
Travis is erroring (due to nvm problems?) but unit tests and lint pass locally for me. |
Make DOM wrapper component using lower-level primitives
I'm so excited about this diff and the future ones like it! |
Just noticed this PR after working on ES3 native components as we discussed in #2895 (comment). Will you be converting all native components to this pattern? |
Yes |
Ah, yes. Sorry for the mixup, but it sounds like this will solve your problem too. |
Ok, great. |
Introducing: a really lame version of composite components, right inside of ReactDOMComponent!
Now ReactDOMInput isn't an actual component. This brings us closer to exposing DOM nodes as refs.