Last active
August 22, 2018 20:26
-
-
Save drenther/96f0b6527772f91e8c1f25a795516d46 to your computer and use it in GitHub Desktop.
index.js for Focus driven Video
This file contains 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
import React from "react"; | |
import ReactDOM from "react-dom"; | |
import VisiblityManager from "./components/VisibilityManager"; | |
import Video from "./components/Video"; | |
const App = () => ( | |
<VisiblityManager> | |
{isVisible => <Video active={isVisible} src="https://www.sample-videos.com/video/mp4/480/big_buck_bunny_480p_30mb.mp4" />} | |
</VisiblityManager> | |
); | |
const rootElement = document.getElementById("root"); | |
ReactDOM.render(<App />, rootElement); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment