Skip to content

Commit 7486e8b

Browse files
committed
Add snack links to hello-react-navigation
1 parent 8b3d5ef commit 7486e8b

File tree

2 files changed

+263
-72
lines changed

2 files changed

+263
-72
lines changed

versioned_docs/version-7.x/getting-started.md

Lines changed: 30 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -78,29 +78,37 @@ work on Android devices. Edit `MainActivity.kt` or `MainActivity.java` file whic
7878
Add the highlighted code to the body of `MainActivity` class:
7979

8080
<Tabs>
81-
<TabItem value='kotlin' label='Kotlin' default>
82-
```kotlin {3-5}
83-
class MainActivity: ReactActivity() {
84-
// ...
85-
override fun onCreate(savedInstanceState: Bundle?) {
86-
super.onCreate(null)
87-
}
88-
// ...
89-
}
90-
```
81+
<TabItem value='kotlin' label='Kotlin' default>
82+
83+
```kotlin
84+
class MainActivity: ReactActivity() {
85+
// ...
86+
// highlight-start
87+
override fun onCreate(savedInstanceState: Bundle?) {
88+
super.onCreate(null)
89+
}
90+
// highlight-end
91+
// ...
92+
}
93+
```
94+
9195
</TabItem>
9296
<TabItem value='java' label='Java'>
93-
```java {3-6}
94-
public class MainActivity extends ReactActivity {
95-
// ...
96-
@Override
97-
protected void onCreate(Bundle savedInstanceState) {
98-
super.onCreate(null);
99-
}
100-
// ...
101-
}
102-
```
103-
</TabItem>
97+
98+
```java
99+
public class MainActivity extends ReactActivity {
100+
// ...
101+
// highlight-start
102+
@Override
103+
protected void onCreate(Bundle savedInstanceState) {
104+
super.onCreate(null);
105+
}
106+
// highlight-end
107+
// ...
108+
}
109+
```
110+
111+
</TabItem>
104112
</Tabs>
105113

106114
and make sure to add the following import statement at the top of this file below your package statement:
@@ -139,6 +147,7 @@ To get started with dynamic configuration, first, we need to wrap your app in `N
139147

140148
```js
141149
import * as React from 'react';
150+
// highlight-next-line
142151
import { NavigationContainer } from '@react-navigation/native';
143152

144153
export default function App() {

0 commit comments

Comments
 (0)