Use Relay as React hooks
useQuery
-> const { data, isLoading, error, retry} = useQuery(query, variables);
(removed cached and added isLoading)
useRefetchable
-> const { data, refetch, isLoading, error } = useRefetchable(node, ref);
(before [data, refetch])
usePagination
-> const { data, hasNext, isLoadingNext, hasPrevious, isLoadingPrevious, isLoading, refetch, loadNext, loadPrevious, errorNext, errorPrevious, error } = usePagination(node, ref);
(before [ data, { isLoading, hasMore, loadMore } ])
useQuery
-> const { data, isLoading, error, retry} = useQuery(query, variables);
(removed cached and added isLoading)
useRefetchable
-> const { data, refetch, isLoading, error } = useRefetchable(node, ref);
(before [data, refetch])
usePagination
-> const { data, hasNext, isLoadingNext, hasPrevious, isLoadingPrevious, isLoading, refetch, loadNext, loadPrevious, errorNext, errorPrevious, error } = usePagination(node, ref);
(before [ data, { isLoading, hasMore, loadMore } ])
fetchObserver
in useQuery
and useLazyLoadQuery
in order to observe the execution of the query in the network. It also adds a new parameter to the retry function to observe its execution.cjs
, es
and umd
bundle generation.reactMode
as concurrent
on next.config.jsssr
param at withData
such changes also work if you use react-relay/hooks