This workshop will help you learn the basics of React Native including how to create, develop, and build an application. The workshop assumes you have some experience with JavaScript and some knowledge of React. While it is aimed at those who are new to React Native but can be used be engineers of any experience level.
Before running this workshop you will need to have the following installed:
It is also recommended that you install Expo Go on your device in order to run the application.
Open and follow the slide deck here:
👉 https://nearform.github.io/react-native-workshop/ 👈
☝️☝️☝️ Start there ☝️☝️☝️
By the end of the above ☝️ workshop, you'll have a working tilt-game app looking something like this:
The workshop splits app creation into the following five steps, each of which has a folder in this repo containing working code for the app at that point:
Objectives:
- Set up an Expo app
- Make it run
Objectives:
- Add all dependencies
- Add the game math using a pre-build hook
- Setup the game area and a static ball
Objectives:
- Detect device tilts by the user
- Control the ball by tilting the device
Objectives:
- Add a target circle
- Place it at a random position
- (No collision detection yet)
Objectives:
- Detect collisions between the ball and the target
- Trigger haptic feedback
Objectives:
- Keep track of the score
- Speak the score out loud
- Allow the score to be reset
If you complete all the above and want to do more, visit the ./step6-bonus directory in the bonus-step PR branch.