-
Notifications
You must be signed in to change notification settings - Fork 0
Issue #8469 - fix(solid-query): client() doesn't return undefined #3
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -116,7 +116,11 @@ export function useBaseQuery< | |
| ) { | ||
| type ResourceData = QueryObserverResult<TData, TError> | ||
|
|
||
| const client = createMemo(() => useQueryClient(queryClient?.())) | ||
| const client = createMemo( | ||
| () => useQueryClient(queryClient?.()), | ||
| useQueryClient(queryClient?.()), | ||
| ) | ||
|
Comment on lines
+119
to
+122
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Fixed client initialization by providing initial value to createMemo. This change ensures that the query client is properly initialized with an initial value, resolving the issue where The second parameter to |
||
|
|
||
| const isRestoring = useIsRestoring() | ||
| // There are times when we run a query on the server but the resource is never read | ||
| // This could lead to times when the queryObserver is unsubscribed before the resource has loaded | ||
|
|
||
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Uh oh!
There was an error while loading. Please reload this page.