Skip to content

Commit 58787a6

Browse files
jgcmarinsbrentvatne
authored andcommitted
Update status-bar.md (react-navigation#381)
Moving from `javascript` to `jsx` enable better code highlights, which will improve readability.
1 parent d519746 commit 58787a6

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

docs/status-bar.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ If you don't have a navigation header, or your navigation header changes color b
1010

1111
This is a simple task when using a stack or drawer. You can simply render the `StatusBar` component, which is exposed by React Native, and set your config.
1212

13-
```javascript
13+
```jsx
1414
class Screen1 extends React.Component {
1515
render() {
1616
return (
@@ -53,7 +53,7 @@ class Screen2 extends React.Component {
5353
}
5454
```
5555

56-
```javascript
56+
```jsx
5757
export default createStackNavigator({
5858
Screen1: {
5959
screen: Screen1,
@@ -68,7 +68,7 @@ export default createStackNavigator({
6868

6969
![StackNavigator with different StatusBar configs](/docs/assets/statusbar/statusbar-stack-demo.gif)
7070

71-
```javascript
71+
```jsx
7272
export default createDrawerNavigator({
7373
Screen1: {
7474
screen: Screen1,
@@ -92,7 +92,7 @@ To fix this we'll have to do two things
9292

9393
First, the new `Screen2.js` will no longer use the `StatusBar` component.
9494

95-
```javascript
95+
```jsx
9696
class Screen2 extends React.Component {
9797
render() {
9898
return (
@@ -116,7 +116,7 @@ class Screen2 extends React.Component {
116116

117117
Then, in both `Screen1.js` and `Screen2.js` we'll set up a listener to change the `StatusBar` configuration when that tab `didFocus`. We'll also make sure to remove the listener when the `TabNavigator` has been unmounted.
118118

119-
```javascript
119+
```jsx
120120
class Screen1 extends React.Component {
121121
componentDidMount() {
122122
this._navListener = this.props.navigation.addListener('didFocus', () => {

0 commit comments

Comments
 (0)