I am now trying to learn react-native from the book Learning React Native.
These are my notes that may help other people following this path.
You can’t use npm 5 with create-react-native-app.
This can be resolved by using
npm install -g email@example.com
This will roll npm back to a known good version. Later versions may work (and by the time you read this (it’s April 2018 as I write this) things may have moved on.
Note that you will also need to install the Expo app onto your phone.
The phone and your machine need to be on the same network.
This is for the first version of the app that was deployed.
There is also a react-native-cli version, but that requires a more complex android setup.
If you are using Expo it has a built in QR reader.
You may also need to register your own api code to use openweathermap.org.
It’s a bad idea to publish a public key for a free service.
So far this book seems less professionally written than the pragprog books that I have been working through recently. It does not seem to flow well and has a few rough edges. Typically code is added piecemeal but requires style details that are not supplied until the full sample.
The weather app is slightly broken. Image can no longer have children. There was no stated version of create-react-native-app so I have installed the latest.
That’s it for now – just finished Chapter 3
Note this is the end of this series of articles. The book was found to have so many broken examples that it was not worth continuing.