feat: integrate with history API on web

This commit is contained in:
Satyajit Sahoo
2020-01-18 18:53:37 +01:00
parent eeae11033a
commit 5a3f8356b0
10 changed files with 435 additions and 82 deletions

View File

@@ -5,7 +5,7 @@
"private": true,
"scripts": {
"start": "expo start",
"web": "expo start --web",
"web": "expo start:web",
"native": "react-native start",
"android": "react-native run-android",
"ios": "react-native run-ios"

View File

@@ -153,7 +153,7 @@ export default function App() {
try {
let state = await getInitialState();
if (state === undefined) {
if (Platform.OS !== 'web' && state === undefined) {
const savedState = await AsyncStorage.getItem(
NAVIGATION_PERSISTENCE_KEY
);

View File

@@ -10,6 +10,8 @@ const packages = path.resolve(__dirname, '..', 'packages');
module.exports = async function(env, argv) {
const config = await createExpoWebpackConfigAsync(env, argv);
config.context = path.resolve(__dirname, '..');
config.module.rules.push({
test: /\.(js|ts|tsx)$/,
include: /(packages|example)\/.+/,