mirror of
https://github.com/zhigang1992/react-native.git
synced 2026-04-18 08:20:38 +08:00
Summary: ag -L --ignore __snapshots__ 'flow strict|noflow|generated|The controller you requested could not be found.' | ag '\.js$' | xargs ag -l 'flow' | sort > ~/temp cat ~/temp | xargs ag -L 'flow strict' | xargs sed -i '' 's/flow$/flow strict-local/' until flow check; do flow check --json | jq -r '.errors[].message[0].path' | sort | uniq | xargs hg revert; done allow_many_files The controller you requested could not be found. The controller you requested could not be found. Reviewed By: TheSavior Differential Revision: D9004573 fbshipit-source-id: 936bd5741706b781be06bf08b6ad805a69407dfd
50 lines
1.1 KiB
JavaScript
50 lines
1.1 KiB
JavaScript
/**
|
|
* Sample React Native App
|
|
* https://github.com/facebook/react-native
|
|
*
|
|
* @format
|
|
* @flow strict-local
|
|
*/
|
|
|
|
import React, {Component} from 'react';
|
|
import {Platform, StyleSheet, Text, View} from 'react-native';
|
|
|
|
const instructions = Platform.select({
|
|
ios: 'Press Cmd+R to reload,\n' + 'Cmd+D or shake for dev menu',
|
|
android:
|
|
'Double tap R on your keyboard to reload,\n' +
|
|
'Shake or press menu button for dev menu',
|
|
});
|
|
|
|
type Props = {};
|
|
export default class App extends Component<Props> {
|
|
render() {
|
|
return (
|
|
<View style={styles.container}>
|
|
<Text style={styles.welcome}>Welcome to React Native!</Text>
|
|
<Text style={styles.instructions}>To get started, edit App.js</Text>
|
|
<Text style={styles.instructions}>{instructions}</Text>
|
|
</View>
|
|
);
|
|
}
|
|
}
|
|
|
|
const styles = StyleSheet.create({
|
|
container: {
|
|
flex: 1,
|
|
justifyContent: 'center',
|
|
alignItems: 'center',
|
|
backgroundColor: '#F5FCFF',
|
|
},
|
|
welcome: {
|
|
fontSize: 20,
|
|
textAlign: 'center',
|
|
margin: 10,
|
|
},
|
|
instructions: {
|
|
textAlign: 'center',
|
|
color: '#333333',
|
|
marginBottom: 5,
|
|
},
|
|
});
|