Created
March 28, 2019 11:47
-
-
Save CezaryDanielNowak/dbc10619bc87f39cf2a29ec097351580 to your computer and use it in GitHub Desktop.
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
<html lang="en"> | |
<head> | |
<meta charset="UTF-8"/> | |
<meta name="viewport" content="width=device-width, initial-scale=1.0"/> | |
<meta http-equiv="X-UA-Compatible" content="ie=edge"/> | |
<title>react-fns with script tags</title> | |
<!-- Load React --> | |
<script src="https://unpkg.com/react/umd/react.development.js"></script> | |
<script src="https://unpkg.com/react-dom/umd/react-dom.development.js"></script> | |
<!-- Load babel for JSX --> | |
<script src="https://unpkg.com/babel-standalone@6.26.0/babel.js"></script> | |
<script src="https://unpkg.com/react-fns@1.3.0/dist/index.umd.js"></script> | |
<!-- Technically there is a minified production build too. --> | |
<!-- <script src="https://unpkg.com/react-fns@1.3.0/dist/index.umd.min.js"></script> --> | |
</head> | |
<body> | |
<div id="root"></div> | |
<script type="text/babel"> | |
const DeviceMotion = window.ReactFns.DeviceMotion | |
const App = () => { | |
return ( | |
<DeviceMotion | |
render={deviceMotionHelpers => ( | |
<pre>{JSON.stringify(deviceMotionHelpers, null, 2)}</pre> | |
)} | |
/> | |
); | |
}; | |
ReactDOM.render(<App />, document.getElementById('root')); | |
</script> | |
</body> | |
</html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment