mirror of
https://github.com/anultravioletaurora/Jellify.git
synced 2025-12-21 13:30:11 -06:00
busted
This commit is contained in:
15
App.tsx
15
App.tsx
@@ -15,6 +15,7 @@ import { createWorkletRuntime } from 'react-native-reanimated';
|
||||
import { SafeAreaProvider } from 'react-native-safe-area-context';
|
||||
import { NavigationContainer } from '@react-navigation/native';
|
||||
import { JellifyDarkTheme, JellifyLightTheme } from './components/theme';
|
||||
import uuid from "react-native-uuid"
|
||||
|
||||
export const backgroundRuntime = createWorkletRuntime('background');
|
||||
|
||||
@@ -58,8 +59,20 @@ export default function App(): React.JSX.Element {
|
||||
<PersistQueryClientProvider
|
||||
client={queryClient}
|
||||
persistOptions={{
|
||||
|
||||
/**
|
||||
* Bust old data in favor of newer
|
||||
* data
|
||||
*/
|
||||
buster: uuid.v4(),
|
||||
|
||||
persister: clientPersister,
|
||||
maxAge: (1000 * 60 * 60) * 1 // 1 hour
|
||||
|
||||
/**
|
||||
* Infinity, since data can remain the
|
||||
* same forever on the server
|
||||
*/
|
||||
maxAge: Infinity
|
||||
}}>
|
||||
<GestureHandlerRootView>
|
||||
<TamaguiProvider config={jellifyConfig}>
|
||||
|
||||
@@ -14,7 +14,11 @@ import { QueryClient } from "@tanstack/react-query";
|
||||
export const queryClient = new QueryClient({
|
||||
defaultOptions: {
|
||||
queries: {
|
||||
gcTime: (1000 * 60 * 60) * 3, // 3 hours
|
||||
/**
|
||||
* Infinity, this needs to be greater than
|
||||
* or higher than the `maxAge`
|
||||
*/
|
||||
gcTime: Infinity,
|
||||
staleTime: (1000 * 60 * 60) * 1 // 1 hour, users can manually refresh stuff too!
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user