react-reveal
react-reveal copied to clipboard
Styled-Components 4.x support
Big fan of react-reveal.
I'm trying to use it with the latest version of styled-components. Previously styled components exposed an innerRef prop that allowed react-reveal to gel nicely but with refForwarding in the latest versions of React, that styled-components prop has been deprecated & removed. This means I can't 'reveal' a styled component without a wrapper div being placed, I believe due to this line, but I'm not sure.
I've made a code pen to exemplify this issue. https://codesandbox.io/s/zrz35jnymp / https://zrz35jnymp.codesandbox.io/
I think it'd probably be a semver major change to update this default prop behavior, so I wouldn't be opposed to adding some sort of flag in the mean time to specify I don't want wrapper div even if the refProp is ref. Thoughts?
I'm facing a similar issue. I'm trying to force re-mount a styled-component. I mean, it does remount, but the animation is only occurring on the first mount.
// THIS WORKS
<Slide right>
<img key={keyThatWillChangeWithSrc} src={props.src}/>
</Slide>
// THIS DOESN'T WORK
<Slide right>
<Styled_IMG key={keyThatWillChangeWithSrc} src={props.src}/>
</Slide>
Is react-reveal still under development?