Skip to content

Props set in playground should be evaluated in the server for the SSR preview #17

@cardoso

Description

@cardoso

Currently setting the component props in playground will evaluate inside the playground's context (browser), lacking access to the server-side environment such as global variables and classes.

The playground README.md seems to imply it should be evaluated in the server-side.

The props don't have to be strings, and they don't even have to be serializable JavaScript objects. Any JavaScript expression that could be evaluated in an SSR enviroment should be supported.

Here's an easy to reproduce example using Date.now():

Set in code

Screenshot 2024-06-07 at 22 52 01

Set in playground

Screenshot 2024-06-07 at 22 52 26

I'm still getting familiar with the project, so maybe some of the above isn't in line with the intended purpose, but in that case it can be clarified in the docs or UI.

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