Swap Between Server-Side Rendering and Client-Side Rendering

Daniel Afonso
InstructorDaniel Afonso
Share this video with your friends

Social Share Links

Send Tweet
Published 2 months ago
Updated a month ago

SolidStart was created with Server-Side Rendering (SSR) in mind. Despite that, we can still fully use it to do Client-Side Rendering (CSR).

In this lesson, we will learn how to switch between SSR and CSR by changing a configuration in our app.config file.

[00:00] By default, Solid Start server side renders our applications. We can validate this by checking our page source and verifying that we already have our pre rendered HTML and CSS here. If instead you prefer to have a single page application and want to enable client side rendering, you can change it in your app config file. [00:20] To do so, inside our define config helper, let's set the SSR property and set it to false. Now if we go back to our application and check the page source, we should see no pre rendered HTML.