This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import messaging from '@react-native-firebase/messaging'; | |
export async function registerForPushNotifications(uid) { | |
// Check and request permissions | |
const authStatus = await messaging().requestPermission(); | |
const enabled = | |
authStatus === messaging.AuthorizationStatus.AUTHORIZED || | |
authStatus === messaging.AuthorizationStatus.PROVISIONAL; | |
if (enabled) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$sizeSmall: 12, | |
column: { | |
flexDirection: 'row', | |
//Add full with | |
width: '100%', | |
//Important, After that screenover 12px, because add margin | |
margin:'$sizeSmall', |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
rm -rf $TMPDIR/metro-* && rm -rf $TMPDIR/haste-* && watchman watch-del-all && npm cache clean --force && npm cache verify && rm -rf ios/build && rm -rf node_modules/ && npm i | |
-if do you use pods | |
rm -rf pods && pod install | |
-for android gradle clean | |
./gradlew cleanBuildCache |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//Dummy data | |
const data = [ | |
{ title: "Title 1", description: "Title Content 1" }, | |
{ title: "Title 2", description: "Title Content 2" } | |
] | |
//Example Callback | |
function getData() { | |
setTimeout(() => { | |
data.map((item, index) => { | |
console.log('getData', item, index) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* component.js */ | |
import EStyleSheet from 'react-native-extended-stylesheet'; | |
// define extended styles | |
const styles = EStyleSheet.create({ | |
column: { | |
width: '80%' // 80% of screen width | |
}, | |
text: { | |
color: '$textColor', // global variable $textColor |