⬆️ Major bumps! Move to RN 0.59

- ⬆️ Bump all dependencies
- ⬆️ react-native 0.59.x using the the `react-native eject` method
- ⬆️ react 16.8.x
- ⬆️ react-navigation 3.x
- ⬆️ tipsi-stripe 7.x
- 📝 Add section on linking native dependencies to README
- 🔥 Remove bitrise android build support
- 🐛 Add a 10 second timeout to all API requests and stop persisting HTTP request state fixing requests hangs
This commit is contained in:
Nikolai R Kristiansen committed 2019-05-04 23:32:45 +02:00
1 parent bdfcb9cccd
commit 1c1a4b64ca
68 files changed
+2927 -1704

No files matched your search

+11
View File
@@ -1,3 +1,14 @@
export function snakeToCamelCase(val) {
return val.replace(/_([a-z])/g, function (g) { return g[1].toUpperCase(); });
}
export function fetchWithTimeout(url, options, timeout=10000) {
/** Wraps fetch to allow it to time out */
// FIXME: show timeout message in UI
return Promise.race([
fetch(url, options),
new Promise((_, reject) =>
setTimeout(() => reject(new Error('Fetch request timed out')), timeout)
)
]);
}