Skip to content
Merged
Changes from 1 commit
Commits
Show all changes
34 commits
Select commit Hold shift + click to select a range
7d4f9e0
docs: use native-stack in hello-react-navigation
kacperkapusciak Jun 2, 2021
cfe11b1
docs: use native-stack in navigating
kacperkapusciak Jun 2, 2021
219bf92
docs: use native-stack in params
kacperkapusciak Jun 2, 2021
39a3748
docs: use native-stack in headers
kacperkapusciak Jun 2, 2021
8ea6404
docs: use native-stack in header-buttons
kacperkapusciak Jun 2, 2021
088736b
docs: use native-stack in nesting-navigators
kacperkapusciak Jun 2, 2021
3a1ca57
docs: use native-stack in navigation-lifecycle
kacperkapusciak Jun 2, 2021
32cc9a2
docs: use native-stack in next-steps
kacperkapusciak Jun 2, 2021
00d60f0
docs: use native-stack in glossary-of-terms
kacperkapusciak Jun 2, 2021
9403d1d
docs: use native-stack in troubleshooting
kacperkapusciak Jun 2, 2021
35144ea
docs: use native-stack in tab-based-navigation
kacperkapusciak Jun 4, 2021
807761c
docs: use native-stack in auth-flow
kacperkapusciak Jun 4, 2021
c048826
docs: use native-stack in handling-safe-area
kacperkapusciak Jun 4, 2021
330c8d1
docs: use native-stack in hiding-tabbar-in-screens
kacperkapusciak Jun 4, 2021
b1b4027
docs: use native-stack in status-bar
kacperkapusciak Jun 4, 2021
0c5e8b2
docs: use native-stack in screen-option-resolution
kacperkapusciak Jun 4, 2021
b88da6b
docs: use native-stack in connecting-navigation-prop
kacperkapusciak Jun 4, 2021
0a85402
Revert "docs: use native-stack in auth-flow"
kacperkapusciak Jun 8, 2021
7fd3446
docs: remove redundant installation step
kacperkapusciak Jun 8, 2021
4b62d4c
Revert "docs: use native-stack in nesting-navigators"
kacperkapusciak Jun 8, 2021
0a5b9bb
docs: fix headerCenter -> headerTitle
kacperkapusciak Jun 8, 2021
483dc5c
docs: use native-stack in navigating-without-navigation-prop example
kacperkapusciak Jun 9, 2021
cbcd45e
docs: use native-stack in themes
kacperkapusciak Jun 9, 2021
dfbc23c
docs: use native-stack in state-persistance sample
kacperkapusciak Jun 9, 2021
00809e3
docs: use native-stack in redux-integration sample
kacperkapusciak Jun 9, 2021
0a39180
docs: update react-native-screens section
kacperkapusciak Jun 9, 2021
e292c61
docs: use native-stack in navigation-container
kacperkapusciak Jun 11, 2021
bd0233e
docs: use native-stack in group
kacperkapusciak Jun 11, 2021
8d6789f
docs: use native-stack in navigation-prop
kacperkapusciak Jun 11, 2021
b2f6c66
docs: use native-stack in navigation-context
kacperkapusciak Jun 11, 2021
2250673
docs: use native-stack in use-navigation-state
kacperkapusciak Jun 14, 2021
83dba16
docs: use native-stack in use-route
kacperkapusciak Jun 14, 2021
8c4f7bf
docs: use native-stack in use-navigation
kacperkapusciak Jun 14, 2021
83bedbd
docs: move screens config to getting-started
kacperkapusciak Jun 28, 2021
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
docs: use native-stack in state-persistance sample
  • Loading branch information
kacperkapusciak committed Jun 9, 2021
commit dfbc23cd8c7388e427ee1f74166f6824b32983e6
10 changes: 5 additions & 5 deletions static/examples/6.x/state-persistance.js
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
import * as React from 'react';
import { View, Button, Linking, AsyncStorage } from 'react-native';
import { Platform, View, Button, Linking, AsyncStorage } from 'react-native';
import { NavigationContainer } from '@react-navigation/native';
import { createBottomTabNavigator } from '@react-navigation/bottom-tabs';
import { createStackNavigator } from '@react-navigation/stack';
import { createNativeStackNavigator } from '@react-navigation/native-stack';

const Tab = createBottomTabNavigator();
const HomeStack = createStackNavigator();
const SettingsStack = createStackNavigator();
const HomeStack = createNativeStackNavigator();
const SettingsStack = createNativeStackNavigator();

function A() {
return <View />;
Expand Down Expand Up @@ -62,7 +62,7 @@ export default function App() {
const initialUrl = await Linking.getInitialURL();

if (Platform.OS !== 'web' && initialUrl == null) {
const savedStateString = await AsyncStorage.getItem(PERSISTENCE_KEY);
const savedState = await AsyncStorage.getItem(PERSISTENCE_KEY);
const state = savedState ? JSON.parse(savedState) : undefined;

if (state !== undefined) {
Expand Down