[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