Last active
August 10, 2018 23:15
-
-
Save ryanlucas/cff01982545e9536898b7460aa1107c2 to your computer and use it in GitHub Desktop.
On
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
yep |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
On | |
tick -> Off | |
Off | |
tick -> On |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const foo = document.createElement("script"); | |
foo.type = "text/javascript"; | |
foo.src = "https://unpkg.com/react-transition-group/dist/react-transition-group.min.js"; | |
document.body.appendChild(foo); | |
let { CSSTransition } = ReactTransitionGroup; | |
function render(model){ | |
const App = () => ( | |
<CSSTransition timeout={2000} in classNames={{ | |
appear: 'my-appear', | |
exit: 'my-done-exit'}}> | |
{status => <div>I'm {status}</div>} | |
</CSSTransition> | |
) | |
if (model.active_states[0].name === "Off") { | |
return <App /> | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment