Skip to content

Commit 00809e3

Browse files
docs: use native-stack in redux-integration sample
1 parent dfbc23c commit 00809e3

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

static/examples/6.x/redux-integration-nav-param.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import { View, Text, Button, StyleSheet } from 'react-native';
33
import { Provider, connect } from 'react-redux';
44
import { createStore, combineReducers } from 'redux';
55
import { NavigationContainer } from '@react-navigation/native';
6-
import { createStackNavigator } from '@react-navigation/stack';
6+
import { createNativeStackNavigator } from '@react-navigation/native-stack';
77

88
// A very simple reducer
99
function counter(state, action) {
@@ -63,7 +63,7 @@ function StaticCounter({ route }) {
6363
let CounterContainer = connect((state) => ({ count: state.count }))(Counter);
6464

6565
// Create our stack navigator
66-
let RootStack = createStackNavigator();
66+
let RootStack = createNativeStackNavigator();
6767

6868
// Render the app container component with the provider around it
6969
export default function App() {
@@ -75,7 +75,7 @@ export default function App() {
7575
<RootStack.Screen
7676
name="StaticCounter"
7777
component={StaticCounter}
78-
options={({ route }) => ({ title: route.params.count })}
78+
options={({ route }) => ({ title: route.params.count.toString() })}
7979
/>
8080
</RootStack.Navigator>
8181
</NavigationContainer>

static/examples/6.x/redux-integration.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import { View, Text, Button, StyleSheet } from 'react-native';
33
import { Provider, connect } from 'react-redux';
44
import { createStore, combineReducers } from 'redux';
55
import { NavigationContainer } from '@react-navigation/native';
6-
import { createStackNavigator } from '@react-navigation/stack';
6+
import { createNativeStackNavigator } from '@react-navigation/native-stack';
77

88
// A very simple reducer
99
function counter(state, action) {
@@ -62,7 +62,7 @@ let StaticCounterContainer = connect((state) => ({ count: state.count }))(
6262
);
6363

6464
// Create our stack navigator
65-
let RootStack = createStackNavigator();
65+
let RootStack = createNativeStackNavigator();
6666

6767
// Render the app container component with the provider around it
6868
export default function App() {

0 commit comments

Comments
 (0)