There's more...

The changes we saw in this recipe are rather small in scope. If you wanted some radically bigger differences, such as, for example, getting a date by using a DatePickerIOS component for iOS, but the DatePickerAndroid API for Android, there's another feature you should consider.

Let's say your own component was named AppropriateDatePicker. If you create two files, respectively named appropriateDatePicker.component.ios.js and appropriateDatePicker.component.android.js, then when you import your component with import { AppropriateDatePicker } from "AppropriateDatePicker", the .ios.js version will be used for Apple, and the .android.js version for Android: simple!

For a complete description of the Platform module and the platform-specific options, read https://facebook.github.io/react-native/docs/platform-specific-code.
..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.135.207.129