Skip to content

Commit d75ce8b

Browse files
committed
(docs): simplify TypeScript example
There is no need to add generics to userQuery now - it will be inferred correctly by the options
1 parent 68d2f81 commit d75ce8b

File tree

1 file changed

+1
-1
lines changed
  • examples/optimistic-updates-typescript/pages

1 file changed

+1
-1
lines changed

examples/optimistic-updates-typescript/pages/index.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ async function fetchTodos(): Promise<TodoData> {
3939
function useTodos<TData = TodoData>(
4040
options?: UseQueryOptions<TData, AxiosError, TodoData>
4141
) {
42-
return useQuery<TData, AxiosError, TodoData>('todos', fetchTodos, options)
42+
return useQuery('todos', fetchTodos, options)
4343
}
4444

4545
function TodoCounter() {

0 commit comments

Comments
 (0)