Skip to content

Commit 5bdd823

Browse files
load routes faster (#63)
1 parent 61d1332 commit 5bdd823

File tree

3 files changed

+141
-7
lines changed

3 files changed

+141
-7
lines changed

package-lock.json

Lines changed: 136 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
"version": "1.0.7",
44
"license": "GNU3",
55
"scripts": {
6-
"start": "expo start --dev-client",
6+
"start": "expo start",
77
"android": "expo run:android",
88
"ios": "expo run:ios",
99
"web": "expo start --web",
@@ -35,7 +35,8 @@
3535
"react-native-swipe-gestures": "^1.0.5",
3636
"react-native-vector-icons": "^9.2.0",
3737
"recoil": "^0.7.5",
38-
"expo-updates": "~0.15.6"
38+
"expo-updates": "~0.15.6",
39+
"expo-dev-client": "~2.0.1"
3940
},
4041
"devDependencies": {
4142
"@babel/core": "^7.12.9",

src/state/dispatchers/routes.js

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -34,13 +34,12 @@ export const fetchRoutes =
3434
});
3535
set(routePatternsState, routePatterns);
3636

37-
let promises = [];
37+
const promises = [];
3838
for (const route of Object.values(routes)) {
3939
promises.push(updateStops(routes, route.ID, set));
4040
promises.push(updateWaypoints(routes, route.ID, set));
41-
await Promise.all(promises);
42-
promises = [];
4341
}
42+
await Promise.all(promises);
4443
};
4544

4645
export const updateCurrentRoute =

0 commit comments

Comments
 (0)