Fade cannot fade components that don't pass down `style`
See original GitHub issue- I have searched the issues of this repository and believe that this is not a duplicate.
Previous Behavior
In version 1.0.0.beta31, you could put anything inside a <Fade>
component and it would get faded.
Current Behavior
As of version 1.0.0.beta32, it seems that Fade
relies on the child component doing the right thing with the style
prop.
Here’s a CodeSandbox example: https://codesandbox.io/s/7j8y2rqyn6
I am not sure if this is intended behavior or not, but the change caught me off guard and I figured I should mention it.
Issue Analytics
- State:
- Created 6 years ago
- Reactions:5
- Comments:5 (5 by maintainers)
Top Results From Across the Web
Fade cannot fade components that don't pass down `style`
As of version 1.0.0.beta32, it seems that Fade relies on the child component doing the right thing with the style prop. ... I...
Read more >MUI Fade component does not show, hide, or fade components
Based on the API here. I believe in set to true should cause the component to fade in. This worked for causing a...
Read more >Fade API - Material UI - MUI
Name Type Default
children * element
addEndListener func
appear bool true
Read more >How to Add a CSS Fade-in Transition Animation to Text ...
A CSS fade transition is a stylistic effect in which an element — like an image, text, or background — gradually appears or...
Read more >Fade in-out text in react. - Level Up Coding
This article shows how to create the fade in-out text effect in react. We make use of react components to create the fade...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@oliviertassinari I would like to take this one if you don’t mind 😃
Since this is my first contribution (ever) i’d like to better understand the agreed upon solution here. So the Fade component should wrap what ever children it gets with a div automatically so the fade transition will work correct ? or are we saying that the user should be aware that he needs to add a single div as child and the docs will tell him that ?
And as for docs , how should this be documented ? if we are going with the first solution i don’t think it should appear in the API doc of this components since its internal .
@sebald Has already experienced this issue. The simplest solution is to add an extra
<div>
element as first children to receive the style property. This change was made in order to better support server rendering. I believe we need to document this point.