This file contains 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
{ | |
... | |
"projects": { | |
... | |
"my-native-app": { | |
"tags": [] | |
} | |
} | |
} |
This file contains 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
{ | |
"version": 1, | |
"projects": { | |
... | |
"my-native-app": { | |
"root": "apps/my-native-app", | |
"sourceRoot": "apps/my-native-app/src", | |
"projectType": "application", | |
"schematics": {}, | |
"architect": { |
This file contains 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
package com.awesomeproject; | |
import android.app.Application; | |
import android.content.Context; | |
import com.facebook.react.PackageList; | |
import com.facebook.react.ReactApplication; | |
import com.facebook.react.ReactInstanceManager; | |
import com.facebook.react.ReactNativeHost; | |
import com.facebook.react.ReactPackage; | |
import com.facebook.soloader.SoLoader; |
This file contains 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
const { withNxMetro } = require('@nrwl/react-native'); | |
module.exports = withNxMetro({ | |
// Put previous config here! | |
}); |
This file contains 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
Show hidden characters
{ | |
"presets": ["@nrwl/react/babel"], | |
"plugins": [["react-native-web", { "commonjs": true }]] | |
} |
This file contains 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 { AppRegistry } from 'react-native'; | |
import { App } from './app/app'; | |
AppRegistry.registerComponent('main', () => App); | |
AppRegistry.runApplication('main', { | |
rootTag: document.getElementById('root'), | |
}); |
This file contains 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 React from 'react'; | |
import { StyleSheet, Text, View } from 'react-native'; | |
import { UiHeading } from '@acme/ui-heading'; | |
export function App() { | |
return ( | |
<View style={styles.box}> | |
<UiHeading text="Hello World!" /> | |
<Text style={styles.text}>This is a demo page.</Text> | |
</View> |
This file contains 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 * as React from 'react'; | |
import { SafeAreaView, StyleSheet, View, Text } from 'react-native'; | |
import { UiHeading } from '@acme/ui-heading'; | |
const App = () => { | |
return ( | |
<> | |
<SafeAreaView> | |
<View style={styles.box}> | |
<UiHeading text="Hello World!" /> |
This file contains 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 * as React from 'react'; | |
import { StyleSheet, View, Text } from 'react-native'; | |
export interface UiHeadingProps { | |
text: string; | |
} | |
export const UiHeading = (props: UiHeadingProps) => { | |
return ( | |
<View style={styles.container}> |
This file contains 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
const fetchUsers = createAsyncThunk( | |
"users/fetch", | |
(function () { | |
// use `p` to ensure promises are returned in order. | |
let p = Promise.resolve(); | |
return () => { | |
// Wait for previous promise to resolve first to guarantee ordering. | |
return p.then(() => { | |
// Change binding to new API call. | |
p = usersAPI.fetchAll(); |