⬆️ 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:
1 parent
3c7564d7bb
commit
8bbbf06fac
16 files changed
+1700
-1104
No files matched your search
@@ -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)
|
||||
)
|
||||
]);
|
||||
}
|
||||
Reference in new issue
Block a user