`SriPlatform` conditionals should output the same code
React-native now uses a single index.js, instead of index.android.js and index.ios.js. Conditionals like if (SriPlatform.isAndroid) produces different code for android:dev and ios:dev tasks.
This makes it hard to use a single file index.js. It should produce the same code, like when using if (ReactPlatform.OS == "android")
Apps created via create-react-native do indeed have only a single index.js. I felt that we had a choice to go down that route or not and so far have chosen not to. CRNA switched to a single index.js by changing the relevant ios/ and android/ code. However, we should decide to go down a path that makes sense for us. Continuing with separate files past when CRNA switched was just convenient when I was dealing with this issue.
aside: Do note that we MUST also support react-native-web going forward (working on an example project that supports all 3 targets in a single code base).
Going forward, happy to revisit. Could you enumerate the benefit of combining into a single index.js?
Thanks!