diff --git a/src/react/hooks/__tests__/useLoadableQuery.test.tsx b/src/react/hooks/__tests__/useLoadableQuery.test.tsx index 73eeaabf373..d89cb5073d8 100644 --- a/src/react/hooks/__tests__/useLoadableQuery.test.tsx +++ b/src/react/hooks/__tests__/useLoadableQuery.test.tsx @@ -4286,7 +4286,7 @@ it("throws when calling loadQuery on first render", async () => { expect(() => renderWithMocks(, { mocks })).toThrow( new InvariantError( - "useLoadableQuery: loadQuery should not be called during render. To load a query during render, use `useBackgroundQuery`." + "useLoadableQuery: 'loadQuery' should not be called during render. To start a query during render, use the 'useBackgroundQuery' hook." ) ); }); @@ -4319,7 +4319,7 @@ it("throws when calling loadQuery on subsequent render", async () => { expect(error).toEqual( new InvariantError( - "useLoadableQuery: loadQuery should not be called during render. To load a query during render, use `useBackgroundQuery`." + "useLoadableQuery: 'loadQuery' should not be called during render. To start a query during render, use the 'useBackgroundQuery' hook." ) ); }); diff --git a/src/react/hooks/useLoadableQuery.ts b/src/react/hooks/useLoadableQuery.ts index e8f492d96da..b873a4ba33a 100644 --- a/src/react/hooks/useLoadableQuery.ts +++ b/src/react/hooks/useLoadableQuery.ts @@ -183,7 +183,7 @@ export function useLoadableQuery< failDuringRender(() => { invariant( false, - "useLoadableQuery: loadQuery should not be called during render. To load a query during render, use `useBackgroundQuery`." + "useLoadableQuery: 'loadQuery' should not be called during render. To start a query during render, use the 'useBackgroundQuery' hook." ); });