Last active
May 27, 2019 05:23
-
-
Save anchetaWern/a3a3d32e3347700d65c1d8eca72c0a22 to your computer and use it in GitHub Desktop.
React Native Accelerometer Maze: Create main component and initialize state
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
| // App.js | |
| export default class App extends Component { | |
| state = { | |
| ballX: theBall.position.x, | |
| ballY: theBall.position.y, | |
| } | |
| // next: add componentDidMount | |
| } | |
| const styles = { | |
| container: { | |
| flex: 1 | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment