File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -96,6 +96,10 @@ export function useBaseQuery<
9696
9797 // Handle suspense
9898 if ( shouldSuspend ( defaultedOptions , result ) ) {
99+ ; ( client . getDefaultOptions as any ) . _experimental_beforeSuspend ?.(
100+ defaultedOptions ,
101+ result ,
102+ )
99103 // Do the same thing as the effect right above because the effect won't run
100104 // when we suspend but also, the component won't re-mount so our observer would
101105 // be out of date.
@@ -121,6 +125,13 @@ export function useBaseQuery<
121125 throw result . error
122126 }
123127
128+ if ( defaultedOptions . suspense ) {
129+ ; ( client . getDefaultOptions as any ) . _experimental_afterSuspend ?.(
130+ defaultedOptions ,
131+ result ,
132+ )
133+ }
134+
124135 // Handle result property usage tracking
125136 return ! defaultedOptions . notifyOnChangeProps
126137 ? observer . trackResult ( result )
You can’t perform that action at this time.
0 commit comments