[pull] canary from vercel:canary - #1319
Merged
Merged
Conversation
## What? Updates the Interactive Apps guide to show how an optimistic mutation handles an expected server error. ## Why? The optimistic card move automatically returns to the confirmed data when the write fails, but the guide did not show how to explain that failure to the user. A success toast would duplicate the visible card movement, so the example only adds feedback for the error case. ## How? - Return a structured error result when the task no longer exists. - Display that expected error in a toast while `useOptimistic` reverts the card. - Forward unexpected thrown errors to the nearest error boundary.
Store/load the encryption keys at `.next/server/preview-props.json` (which are always needed) as opposed to including the giant `.next/prerender-manifest.json` The manifest is added to `required-server-file.json#files` so it keeps getting included in prod `.next/prerender-manifest.json` is unchanged for backwards compatiblity reasons This is work towards the goal of not including the one giant prerender-manifest at runtime in the serverless function
…97551) ### Why? generateMetadata can be marked with use cache, but Cache Function return values must be serializable. The metadataBase examples use URL objects, so the interaction needs co-located guidance for cached metadata. ### How? Add a Good to know note that recommends returning metadataBase as a string, such as with url.toString(), and links to the use cache serialization requirements. Runtime behavior is unchanged. <!-- NEXT_JS_LLM --> --------- Co-authored-by: Joseph <joseph.chamochumbi@vercel.com>
This file contains hidden or 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
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
See Commits and Changes for more details.
Created by
pull[bot] (v2.0.0-alpha.4)
Can you help keep this open source service alive? 💖 Please sponsor : )