Skip to content

Instantly share code, notes, and snippets.

@drenther
Last active August 22, 2018 20:26
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save drenther/96f0b6527772f91e8c1f25a795516d46 to your computer and use it in GitHub Desktop.
Save drenther/96f0b6527772f91e8c1f25a795516d46 to your computer and use it in GitHub Desktop.
index.js for Focus driven Video
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