diff --git a/docs/concepts/server-components.md b/docs/concepts/server-components.md new file mode 100644 index 00000000..47791b0b --- /dev/null +++ b/docs/concepts/server-components.md @@ -0,0 +1,17 @@ +--- +description: | + Fresh's architecture is designed to leverage server components by default. +--- + +If you've read about Fresh's [architecture](/docs/concepts/architecture) then +you know that it's based on the islands architecture pattern. The flip side of +this is that everything else is, by default, a server component. When you +[create a route](/docs/getting-started/create-a-route), all of the components +used are rendered on the server. No javascript is sent to the client, unless you +specifically include something from the `/islands/` folder. + +Internally, Fresh's rendering heavily leverages +[preact-render-to-string](https://github.com/preactjs/preact-render-to-string). +This is the exact library mentioned on Preact's +[Server-Side Rendering](https://preactjs.com/guide/v10/server-side-rendering/) +article. diff --git a/docs/toc.ts b/docs/toc.ts index ddcaf631..a1b294ff 100644 --- a/docs/toc.ts +++ b/docs/toc.ts @@ -45,6 +45,7 @@ const toc: RawTableOfContents = { link: "latest", pages: [ ["architecture", "Architecture", "link:latest"], + ["server-components", "Server Components", "link:latest"], ["routes", "Routes", "link:canary"], ["forms", "Forms", "link:latest"], ["islands", "Interactive islands", "link:canary"], @@ -120,6 +121,7 @@ const toc: RawTableOfContents = { title: "Concepts", pages: [ ["architecture", "Architecture"], + ["server-components", "Server Components"], ["routes", "Routes"], ["forms", "Forms"], ["islands", "Interactive islands"],