README
react-native-catch-first-time
Rejects promise when your app is running for the first time.
Useful when providing a first-login experience.
Usage
var firstTime = require('react-native-catch-first-time');
var DeviceInfo = require('react-native-device-info');
firstTime(DeviceInfo.getUniqueID())
.catch(function () {
navigator.push({
component: AppIntro
})
});
.then
branch?
Why not resolving into Putting your code into a .catch
clause allows you not specifying
the .then
handler, which wouldn't be true in the opposite case.
Choosing on UID
The recommended way is to use device's UUID. You can obtain one using react-native-device-info or react-native-device-uuid libraries.
If you prefer not to catch on the first time after reinstalling the app, put a random string into your config and never change it.
License
MIT
2016