Christopher Belanger, PhD MBA Posts Projects Publications CV Contact Click here to open the menu.

A Minimal(ish?) Example of Using Session Cookies in SolidStart

This is a minimal working example showing how you can use session cookies to store persistent user data with Solid Start.

The code itself is heavily commented and is available on GitHub, and I hope that in conjunction with the data dump below it helps somebody out.

What are cookies, and why?

Here’s a quick run-down of the basics, but you can read a more detailed and technical discussion cookies here.

What is SolidStart, and why?

SolidStart is a meta-framework for building full-stack web applications that’s based on SolidJS.

How do we set session cookies in a SolidStart app?

To get session cookies to work in SolidStart, you have to put a few different pieces together in just the right way. And while the docs describe each of those bits individually, a few of the concepts weren’t quite spelled out and I couldn’t find a minimal end-to-end example. Hence, this.

The main points (as far as I know)

Tags: