-
Notifications
You must be signed in to change notification settings - Fork 94
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
Release v9.0.0 #151
Merged
Merged
Release v9.0.0 #151
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
* updated contribute to run examples * updated examples md
…with isPending, since this is the preferred terminology.
…pport it properly.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
v9.0.0: The one with Suspense support
This release adds basic, experimental support for Suspense. Furthermore it contains mostly bugfixes, one of which causes a minor but breaking change for
useFetch
.suspense
flag [@ghengeveld in Add experimental Suspense support #153]resource
argument when invokingrun
throughuseFetch
[@ghengeveld in Allow overriding the 'resource' argument of 'fetch' when invoking 'run'. #150]useFetch
rejects with anError
type [@artdent in Make sure useFetch rejects with an Error type. #114]promise
render prop, so it's always a Promise [@ghengeveld in Make sure the promise render prop is always defined #148]displayName
to thecreateInstance
TypeScript definition [@artdent in Add displayName to the createInstance type signature. #102]Breaking changes
useFetch
rejection typePreviously with
useFetch
, a failure response would reject with the response object. It's better for rejections to be of typeError
so that the full stack trace information is available. Also, the TypeScript type definition assumes that the error object is always an instance of Error. Therefore, the rejection value is now of type FetchError (a subclass of Error) which adds theresponse
property so you can still access the underlying response, without breaking contract.What to do:
useFetch
and are using theerror
value, expecting it to be of typeResponse
, you must now useerror.response
instead.Experimental Suspense support
Due to its experimental nature, we may make breaking changes to this feature even in minor or patch releases, until Suspense for data fetching is officially released. Until then, this is marked experimental.