Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

solid-ssr

Package Overview
Dependencies
Maintainers
1
Versions
248
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

solid-ssr

Patches node to work with Solid's SSR

  • 0.19.0-beta.0
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
149
increased by166.07%
Maintainers
1
Weekly downloads
 
Created
Source

solid-ssr

This library provides tools to help with SSR. So far it's a simple Static Generator. This project is still in progress.

Look at the examples to best understand how to use it.

Examples

There are 4 examples all using the same shared source. It is an isomorphically routed tab navigation using Suspense, Lazy Components, and Data Fetching. They are just compiled differently and have slightly different server entry points.

  1. ssr

Uses standard synchronous SSR. Renders what it can synchronously on the server and hydrates top level in the client. Async data is fetcbed and rendered in the client without hydration.

  1. stream

Similar to ssr except using streams. Data is loaded on the server and sent along the stream so the client can render it. Again only initial HTML is hydrated. Slightly speeds up data loading, so total page load time is reduced.

  1. async

Resolves everything reactively on server before sending HTML and serialized data to the client. Whole page is hydrated, but all loading states are avoided. Total load time is similar to streaming, but time to first paint is blocked by how long it takes to load data.

  1. ssg

Using async compiler configuration to statically generate pages. Removes the time it takes to render real time.

Examples run on http://localhost:8080/. To run them (in this case ssr):

lerna run build:example:ssr --stream
lerna run start:example:ssr --stream

FAQs

Package last updated on 19 Aug 2020

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc