Welcome to the workshop! You will be implementing some animations using React Native. Before you do that, we need to get you set up.
We recommend that you use a MAC to run the workshop or pair up with someone who has a MAC.
Any problems, questions or comments you may have, please Slack us: @juanjo and @alberto.chamorro.
- You need yarn. If you want to check if you have it, run
yarn --version
. If you have version 1.15 or above, you're good. If you don't, install yarn using homebrew runningbrew install yarn
in your terminal window. If you don't have homebrew you can get it here. Homebrew is a MAC only tool, for Windows installations see the linked pages of each of the required components. - You need watchman. If you don't have it, install it with
brew install watchman
. If you want to check whether or not you have it typewatchman -v
. We have tested version 4.9. It may work with other versions as well. If you want to upgrade to be sure, runbrew upgrade watchman
. - You need expo. Expo allows you to build, deploy and iterate on your React Native app very quickly. Install expo globally using
yarn global add expo-cli
. Runexpo --version
on your terminal window to ensure it installed correctly. You should see something like 1.1.0 (or the version you installed). - You need to clone this repo.
- Finally, to install all the dependencies this project requires, go to the folder where you cloned the repo and run
yarn install
.
We recommend Visual Studio Code. It's also a widely used option at Hudl.
Congratulations, if you've made it here you have your development environment ready 🎉. Now, you need a place to deploy the fancy animations you'll be creating.
There are 2 options: Running it on the device and on the simulator. Ideally, we could all have them running on the devices. That requires your phone and computer to be on the same network. However, since we don't know the quality of network we'll have on the venue, we highly recommend that you also install one of the simulators as a fallback option in case network isn't good enough.
- Install iOS or Android simulators, if you don't have them already:
- For iOS, install Xcode.
a. For Xcode you'll also need the command line tools. Open Xcode and go to
Xcode -> Preferences -> Components
. If you don't see the command line tools there is because you already have them. If you see them there, click to install them. - For Android, install Android Studio. This is your only viable option if you're on a Windows machine. See below Android Studio post installation steps.
- For iOS, install Xcode.
a. For Xcode you'll also need the command line tools. Open Xcode and go to
- Open 2 terminal windows.
- In the first one, run
yarn storybook
. - In the second terminal window, run
yarn start
. That should open a new tab in your browser where expo would start doing it's magic. - In the tab that was just opened, click on
Run on Android device / emulator
orRun on iOS simulator
depending on what you installed in the first step.
- In the first one, run
That will launch the simulator and prompt you to install the Expo app there. After expo is installed you'll see a Home page screen. Click on Got It
and you should see something like this
You're all set 🙂.
- Create an account on expo.io
- Install the expo app on your phone
- Launch the app on your phone and log in with the credentials you created earlier
- Open 2 terminals.
- In the first one, run
yarn storybook
. - In the second one, run
expo login
and log in with the credentials you created in the previous step. - After logging in, run
yarn start
. That should open a new tab in your browser where expo would start doing it's magic. - In the tab that was just opened, click on
Publish or republish
project. You will be presented a brief form there. Change it or leave it as is, it doesn't affect the functionality. - Ensure your phone and computer are on the same network and go back to the Expo app you already installed on your phone. You should see the project you just published both in the
Projects
andProfile
section. If you do not, pull down to refresh. If you still don't see it make sure you're logged in with the user you created earlier. If none of the previous work, try killing and re-opening the app. Don't take it personally. Expo is a bit stubborn sometimes. - Once you see the project tapping on it would open storybooks on your phone.
- In the first one, run
If you want to use an Android emulator, you would need to install it separately after Android Studio has finished. Please follow these instructions to install one.
- For
Step 2: Set up a virtual device
, you would need to create a new empty project. It doesn't matter what project type you use. Pick the default one. - I tested installing
Pixel 2
as virtual device andQ
as system images. Others configuration should work too but if you want to be on the safe side, pick that. - After completing all the steps in the link, make sure you run the empty project you created in 1. in the installed virtual device. That may install some required dependencies in case you don't have them.
These are the slides presented at the beginning of the workshop.
Once again, any problems, questions or comments you may have, please Slack us: @juanjo and @alberto.chamorro.
For the exercises you will be implementing some animations created by our designers. These animations are either included in a Hudl mobile app or planned to be.
Go to the Exercises when you're ready.