React-native init from react-native master branch or any untagged commit

A very short post, but hopefully useful nonetheless.

If you have ever wanted to quickly test a feature only available in react-native’s master branch, and not released in any tagged version on npm, you can do so by using react-native init in the following way: react-native init exampleApp --version facebook/react-native: npm let’s us specify dependencies on github, perhaps not currently published on npm, using the following format: repoAuthorName/repoName#commitHash; we can even tie to a specific commit hash if we would like.

React-native init uses the version arg directly in a local yarn add/npm install call under-the-hood, so specifying the react-native version in such a way is completely valid npm dependency and a valid argument for react-native-init.

Show your support

Clapping shows how much you appreciated Josh Hargreaves’s story.