Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Select an option

  • Save anchetaWern/a3a3d32e3347700d65c1d8eca72c0a22 to your computer and use it in GitHub Desktop.

Select an option

Save anchetaWern/a3a3d32e3347700d65c1d8eca72c0a22 to your computer and use it in GitHub Desktop.
React Native Accelerometer Maze: Create main component and initialize state
// 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