Skip to content

v4.0.0-rc.3

Compare
Choose a tag to compare
@morrys morrys released this 13 Jan 19:29
· 278 commits to master since this release

Breaking Change

  • removed support to Mutation HOC
  • useRefetch no longer exists
  • remove fetchObserver in useQuery in favor of onComplete property
  • changed the return type:
    • 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 } ])
  • usePagination now use of the @refetchable directive

Improved

  • added useRefetchableFragment hook with suspense
  • added usePaginationFragment hook with suspense
  • useSuspenseFragment hook with suspense like useFragment in relay-experimental
  • update dependency fbjs
  • support relay-runtime v10.x.x
  • added more tests
  • Added babel dev-expression in order to reduce bundle size
  • Removed warning in StrictMode
  • improved example with pagination