feat(LiveProvider): add opt-in server-rendered previews - #414
tujoworker wants to merge 1 commit into
Conversation
|
@tujoworker is attempting to deploy a commit to the formidable-labs Team on Vercel. A member of the Team first needs to authorize it. |
fa9e0c8 to
4ab62dc
Compare
🦋 Changeset detectedLatest commit: 188edc8 The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
4ab62dc to
188edc8
Compare
|
Hi @ryan-roemer. This is now rebased onto v5 and reworked as opt-in SSR through an GitHub Actions is waiting for maintainer approval because this is an external contribution, and Vercel also needs team authorization. Would you have time to approve CI and review the API direction? Feedback on whether this approach fits the project would also be very helpful. |
Summary
LiveProviderpreviews are currently client-only. Rendering examples on the server by default would be unsafe because it could unexpectedly execute consumer code, browser-dependent code, or side effects during a server request.This adds an explicit
ssrprop for trusted, deterministic examples. Synchronous previews render in the initial server response without repeating the transform after hydration. Asynchronous transforms stay empty on the server, reuse the client hydration promise, and ignore stale results from older edits. Existing consumers remain client-only by default.