Skip to content

2.0.0-beta.30 | createStore with {ssrSource:"client"} ignores ssrSource and runs on the server #2972

Description

@royeden

Describe the bug

When testing the new Solid 2.0 beta, I noticed that some browser APIs were being accessed in my async store, despite the ssrSource flag being set to 'client'.

I tried a minimal repro with console log and I can confirm this is the only primitive affected by this issue.

This only seems to happen on first load, navigating back doesn't re-trigger the server signals

Your Example Website or App

https://stackblitz.com/edit/solidjs-templates-27haqteg?file=src%2Froutes%2FHome.tsx

Steps to Reproduce the Bug or Issue

  1. Open the stackblitz URL.
  2. Logs should show after page load in the server console and in the client console.
  3. You should see the log Log: "store" in server. No other primitive should log.

Expected behavior

I expected nothing to log on the server when the ssrSource is set to 'client'.

Screenshots or Videos

Image

A showcase of the logs that appear on the repro

Platform

  • OS: macOS
  • Browser: Chrome
  • Version: 150

Additional context

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions