chipit24 / fade-props Goto Github PK
View Code? Open in Web Editor NEWA ReactJS component that seamlessly fades between the props it is provided; it fades one child out, removes it, then fades the next child in.
License: ISC License
A ReactJS component that seamlessly fades between the props it is provided; it fades one child out, removes it, then fades the next child in.
License: ISC License
I have some code like this:
const children = loaded ? <Buttons key="buttons" /> : <Loader key="loader" />;
<FadeProps animationLength={500} children={children} />
When it switches from loaded=true
to loaded=false
then back to loaded=true
too quickly (less than the animation time, roughly) the content fades out, but nothing fades in.
In this recording below when I click "Lets Go" it sets loaded=false
which fades out the button and when the error "Name already taken" appears it sets loaded=true
(before the button has finished fading out) but the button never fades back in (nor does the loader ever show up):
I need the buttons to either fade back in after they fade out, or (preferably) interrupt the fade out and fade back to 100% opacity.
For reference, if the change happens with enough time for the fades to complete it looks like this:
Right now the package has hard dependency on specific version of React, meaning it fetches it's own copy, causing compatibility issues. Please consider adding version ranges instead.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.