The HelloWorld template project in react-native/local-cli currently assumes that there will be two entry points: index.ios.js and index.android.js. CRNA projects start with a single main.js (although this is fungible and could easily be called index.js), which breaks on iOS (haven't tested Android) once ejected to a regular RN project.
For now I'm implementing some dirty hacks around this, but would like to make the upstream template project(s) compatible with CRNA's eject in the near term. I think this will just require a PR that I don't have bandwidth to write and push through right now.
EDIT: this wouldn't just require unifying the files, it looks like test and example code (and maybe docs?) assume that these files will be separate.
I like main.js better than index.js actually! Index is so webby :)
But actually we're trying to bring RN and web development closer together, so let's keep index. Also people are kind of used to it by now.
:D I should note that I moved the CRNA template to index.js to match up with the dirty hack I wrote for providing the HelloWorld template with index.(ios|android).js files. Can definitely change it back!
Cool I'll update the template.
index.js is good (edited my comment above) 馃憤
@mkonicek does this seem like something likely to make it into 0.42?
I'm working on a pull request to make this change to the HelloWorld template in react-native and all the tests and docs that refer to the old index.ios.js/index.android.js files.
I've made the upstream changes here: https://github.com/facebook/react-native/pull/15312.
Most helpful comment
index.js is good (edited my comment above) 馃憤