Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[RFC] - relay-hooks version 4.0.0 #126

Closed
21 of 22 tasks
morrys opened this issue Nov 17, 2020 · 2 comments
Closed
21 of 22 tasks

[RFC] - relay-hooks version 4.0.0 #126

morrys opened this issue Nov 17, 2020 · 2 comments

Comments

@morrys
Copy link
Member

morrys commented Nov 17, 2020

Breaking Change

  • removed support to Mutation HOC
  • useRefetch no longer exists
  • changed the return type of useRefetchable & usePagination
  • remove fetchObserver in useQuery in favor of onComplete property
  • const { data, isLoading, error, retry} = useQuery(query, variables); (removed cached and added isLoading)
  • const { data, refetch, isLoading, error } = useRefetchable(node, ref); (before [data, refetch])
  • const { data, hasNext, isLoadingNext, hasPrevious, isLoadingPrevious, isLoading, refetch, loadNext, loadPrevious, errorNext, errorPrevious, error } = usePagination(node, ref); (before [ user, { isLoading, hasMore, loadMore } ])

Improved

  • added useRefetchableFragment, usePaginationFragment & useSuspenseFragment, they use suspense like in relay-experimental
  • added tests
@morrys morrys changed the title relay-hooks 4.0.0 relay-hooks version 4.0.0 Nov 17, 2020
@morrys morrys changed the title relay-hooks version 4.0.0 [RFC] - relay-hooks version 4.0.0 Nov 17, 2020
@morrys morrys pinned this issue Nov 18, 2020
@morrys
Copy link
Member Author

morrys commented Dec 16, 2020

Released version 4.0.0-rc.1 and pushed the nextjs-ssr sample project into the branch

relay-4 0 0

@morrys
Copy link
Member Author

morrys commented Jan 18, 2021

relay-hooks 4.0.0 released

@morrys morrys closed this as completed Jan 18, 2021
@morrys morrys unpinned this issue Feb 2, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant