-
-
Notifications
You must be signed in to change notification settings - Fork 32.5k
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
[core] Standardize the component injection pattern #11204
[core] Standardize the component injection pattern #11204
Conversation
916f8a3
to
b7485e3
Compare
b7485e3
to
54c2599
Compare
The only question I have (and I don't have a strong opinion) is whether the first character of the prop should be capitalised or not? |
We also have https://github.com/mui-org/material-ui/blob/3e4854b39b17511d9b312071ca93061eeb503f5d/packages/material-ui/src/Input/Input.js#L542. |
This is a compliment to the existing |
If this is the direction to go, the property name should remain capitalized:
const { transitionComponent: TransitionComponent } = this.props
return <TransitionComponent/> |
This is a good point. Maybe we should go further and change |
54c2599
to
d4d1877
Compare
@kgregory The logics I have been following:
|
@oliviertassinari You left out |
I couldn't find a clean way to support the render props pattern.
Doing such would require to greatly reduce the usage of JSX. It would really harm source code readability.
Instead, I have been focusing on standardizing our component injection story.
This way, we can go back to the render props after stable v1 is released and see if source code readability worth be sacrificed for the render prop pattern.
Closes #10476. Might be better to start from a fresh issue in the future.
Breaking change