Skip to content

Instantly share code, notes, and snippets.

@jay-babu
Last active June 6, 2024 17:17
Show Gist options
  • Save jay-babu/a241f6ae351cf59d7d49df2008cdf2ab to your computer and use it in GitHub Desktop.
Save jay-babu/a241f6ae351cf59d7d49df2008cdf2ab to your computer and use it in GitHub Desktop.
diff --git a/src/hooks/useEntityConfig.tsx b/src/hooks/useEntityConfig.tsx
index 344ad076..a0720489 100644
--- a/src/hooks/useEntityConfig.tsx
+++ b/src/hooks/useEntityConfig.tsx
@@ -67,6 +67,7 @@ export const useEntityConfigInternal = <T,>(
) => {
const [cachedValue, setCachedValue] = useLocalStorage<T>(
`e_${entityId ?? 0}_${key}`,
+ defaultValue,
);
const { data, isFetching, error } = useQuery({
queryKey: ["entityConfig", entityId ?? 0, key],
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment