Skip to content

Conversation

@atilafassina
Copy link
Member

This better clarifies how to change rendering mode per route, in the configuration, and what would be the use-cases for each mode.

@atilafassina atilafassina requested a review from Copilot October 20, 2025 16:35
@atilafassina atilafassina self-assigned this Oct 20, 2025
@bolt-new-by-stackblitz
Copy link

Review PR in StackBlitz Codeflow Run & review this pull request in StackBlitz Codeflow.

Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR enhances the SolidStart documentation by expanding the explanation of rendering modes (sync, async, and stream). It clarifies how to configure rendering modes globally and per-route, and provides guidance on when to use each mode.

  • Adds a comprehensive new page explaining rendering modes with use cases and feature comparisons
  • Updates configuration and server entry point references to link to the new rendering modes documentation
  • Adds mode parameter documentation to the config reference

Reviewed Changes

Copilot reviewed 5 out of 5 changed files in this pull request and generated 5 comments.

Show a summary per file
File Description
src/routes/solid-start/building-your-application/rendering-modes.mdx New comprehensive guide explaining the three rendering modes, their features, and configuration options
src/routes/solid-start/building-your-application/data.json Adds the new rendering modes page to the navigation
src/routes/solid-start/reference/server/create-handler.mdx Updated to reference the new rendering modes page and improved type signature documentation
src/routes/solid-start/reference/entrypoints/entry-server.mdx Simplified with references to the new rendering modes documentation
src/routes/solid-start/reference/config/define-config.mdx Added mode parameter documentation and formatting improvements

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

atilafassina and others added 5 commits October 20, 2025 18:37
Co-authored-by: Copilot <[email protected]>
Co-authored-by: Copilot <[email protected]>
Co-authored-by: Copilot <[email protected]>
Co-authored-by: Copilot <[email protected]>
Co-authored-by: Copilot <[email protected]>
@atilafassina atilafassina marked this pull request as ready for review October 20, 2025 16:38
@netlify
Copy link

netlify bot commented Oct 20, 2025

Deploy Preview for solid-docs ready!

Name Link
🔨 Latest commit c83f957
🔍 Latest deploy log https://app.netlify.com/projects/solid-docs/deploys/68f664d54d382500088bdeea
😎 Deploy Preview https://deploy-preview-1308--solid-docs.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@netlify
Copy link

netlify bot commented Oct 20, 2025

Deploy Preview for solid-docs ready!

Name Link
🔨 Latest commit ea97511
🔍 Latest deploy log https://app.netlify.com/projects/solid-docs/deploys/68fe6bdcae72230008b836aa
😎 Deploy Preview https://deploy-preview-1308--solid-docs.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@atilafassina atilafassina enabled auto-merge (squash) October 21, 2025 07:28
@atilafassina atilafassina added the solidstart Related to SolidStart label Oct 21, 2025
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

Copilot reviewed 5 out of 5 changed files in this pull request and generated 3 comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.


- Data-fetching: client-side only, first load will render Suspense fallbacks.
- Time To First Byte (TTFB): fast since the server-side rendering is minimal.
- Total page load time: slower since the client-side rendering is heavier.
Copy link

Copilot AI Oct 26, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The phrase 'to render the page' is repeated. Remove the first occurrence to read: 'Uses renderToString from Solid's core to render the page synchronously.'

Suggested change
- Total page load time: slower since the client-side rendering is heavier.
Uses [`renderToString`](/reference/rendering/render-to-string) from Solid's core to render the page synchronously.

Copilot uses AI. Check for mistakes.
@atilafassina atilafassina requested a review from Copilot October 26, 2025 18:43
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

Copilot reviewed 5 out of 5 changed files in this pull request and generated 4 comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

### Async Mode

Uses [`renderToStringAsync`](/reference/rendering/render-to-string-async) to render the page from Solid's core to render the page asynchronously.
Uses [`renderToStringAsync`](/reference/rendering/render-to-string-async) from Solid's core to render the page asynchronously.
Copy link

Copilot AI Oct 26, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Duplicate line: Line 31 repeats the same content as line 30. Remove the duplicate line.

Suggested change
Uses [`renderToStringAsync`](/reference/rendering/render-to-string-async) from Solid's core to render the page asynchronously.

Copilot uses AI. Check for mistakes.
Comment on lines +38 to +39
Uses [`renderToStream`](/reference/rendering/render-to-stream) from Solid's core to render the page streaming.
- **Data-fetching**: first render will be similar to sync mode, but data fetching will still happen in the background and responses will be streamed in chunks as available.
Copy link

Copilot AI Oct 26, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The description at line 38 appears to be misplaced in the Async Mode section. This line describes stream mode functionality but is located within the Async Mode section (after line 37 which discusses server-side features for async mode). It should either be removed from this section or the section structure needs to be corrected.

Copilot uses AI. Check for mistakes.
Comment on lines +92 to +94
mode: (event) => {
return { mode: event.request.url.includes("/special-route") ? "async" : "stream" };
}
Copy link

Copilot AI Oct 26, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The options parameter should be a function that returns an object with a mode property, but the signature shows it can also be just an object. The example wraps the mode in a function that returns an object, but based on the type signature in create-handler.mdx (line 35), when using a function, it should return { mode: RenderingModes } directly. The current example has an unnecessary wrapper function—it should be (event) => ({ mode: event.request.url.includes(\"/special-route\") ? \"async\" : \"stream\" }).

Suggested change
mode: (event) => {
return { mode: event.request.url.includes("/special-route") ? "async" : "stream" };
}
mode: (event) => ({ mode: event.request.url.includes("/special-route") ? "async" : "stream" })

Copilot uses AI. Check for mistakes.
Comment on lines +106 to +108
mode: (event) => {
return { mode: isBot(event.request.userAgent) ? "async" : "stream" };
}
Copy link

Copilot AI Oct 26, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same issue as Comment 3: The function should directly return the object ({ mode: isBot(event.request.userAgent) ? \"async\" : \"stream\" }) without the explicit return statement and extra braces, to match the type signature.

Suggested change
mode: (event) => {
return { mode: isBot(event.request.userAgent) ? "async" : "stream" };
}
mode: (event) => ({ mode: isBot(event.request.userAgent) ? "async" : "stream" })

Copilot uses AI. Check for mistakes.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

solidstart Related to SolidStart

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants