FormidableLabs/formidable-react-native-app-boilerplate

components by plateform

Closed this issue · 2 comments

thanks for the great work,

at some point you want to make platform dependent components,

how you can use reflux to choose which component to load ?

Generally speaking, you can either use file.ios.js or file.android.js file naming to conditionally load for each platform. Alternatively you can use navigator.platform to determine the context in which the application is running.

i forgot to close the issue, yes you can use file.ios.js or file.android.ios,
you import your file by only using import 'file' from 'file' without platform.js , react will import the corresponding file for you.