Home of The Times' react
/react native
components, using
react-native-web to share across
platforms
We require MacOS with Node.js (version >=8 with npm v5), yarn (latest) and watchman installed. Native development requires Xcode, Android Studio and JDK 8.
You can try without these requirements, but you'd be on your own.
- Run
yarn
to install dependencies - Install fontforge:
brew install fontforge
(See Fonts section) - Components can be seen running in a storybook:
- web storybook
yarn storybook
- go to http://localhost:9001
- native storybook
yarn storybook-native
and leave it runningyarn ios
to start the iOS app- To start the Android app:
- Start a virtual device
yarn android
- If you get build errors, check your JDK version with
javac -version
, which should printjavac 1.8.XXXX
. Earlier or later versions may not work.
- go to http://localhost:7007
In order to view the storybook on native, you'll need to fix broken fonts. This fix is done automatically when running storybook (both web and native), but requires that fontforge is installed, otherwise the fix won't be applied and you'll get the classic red error screen when trying to use a broken font.
See the CONTRIBUTING.md for an extensive breakdown of the project