-
Notifications
You must be signed in to change notification settings - Fork 24.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Move debug and reload instructions to their own modules
This will abstract over the platform checks and reduce the amount of hard coded copy we have in the initial app template.
- Loading branch information
1 parent
829f723
commit b266a5c
Showing
4 changed files
with
90 additions
and
80 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
/** | ||
* Copyright (c) Facebook, Inc. and its affiliates. | ||
* | ||
* This source code is licensed under the MIT license found in the | ||
* LICENSE file in the root directory of this source tree. | ||
* | ||
* @flow | ||
* @format | ||
*/ | ||
|
||
import React from 'react'; | ||
import {Platform, StyleSheet, Text} from 'react-native'; | ||
|
||
const styles = StyleSheet.create({ | ||
highlight: { | ||
fontWeight: '700', | ||
}, | ||
}); | ||
|
||
const DebugInstructions = Platform.select({ | ||
ios: () => ( | ||
<Text> | ||
Press <Text style={styles.highlight}>Cmd+D</Text> in the simulator or{' '} | ||
<Text style={styles.highlight}>Shake</Text> your device to open the React | ||
Native debug menu. | ||
</Text> | ||
), | ||
default: () => ( | ||
<Text> | ||
Press <Text style={styles.highlight}>menu button</Text> or | ||
<Text style={styles.highlight}>Shake</Text> your device to open the React | ||
Native debug menu. | ||
</Text> | ||
), | ||
}); | ||
|
||
export default DebugInstructions; |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
/** | ||
* Copyright (c) Facebook, Inc. and its affiliates. | ||
* | ||
* This source code is licensed under the MIT license found in the | ||
* LICENSE file in the root directory of this source tree. | ||
* | ||
* @flow | ||
* @format | ||
*/ | ||
|
||
import React from 'react'; | ||
import {Platform, StyleSheet, Text} from 'react-native'; | ||
|
||
const styles = StyleSheet.create({ | ||
highlight: { | ||
fontWeight: '700', | ||
}, | ||
}); | ||
|
||
const ReloadInstructions = Platform.select({ | ||
ios: () => ( | ||
<Text> | ||
Press <Text style={styles.highlight}>Cmd+R</Text> in the simulator to | ||
reload your app's code | ||
</Text> | ||
), | ||
default: () => ( | ||
<Text> | ||
Double tap <Text style={styles.highlight}>R</Text> on your keyboard to | ||
reload your app's code | ||
</Text> | ||
), | ||
}); | ||
|
||
export default ReloadInstructions; |
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
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