Skip to content

getSSRProps has no access to vnode #10026

@TheAlexLichter

Description

@TheAlexLichter

Vue version

3.4.5

Link to minimal reproduction

https://stackblitz.com/edit/vue-issues-10026

Steps to reproduce

  1. Use getSSRProps
  2. Check the 2nd argument (vNode)
  3. See it always it empty

What is expected?

vNode should be available so you can update or change class values via SSR directives. Right now, you can provide a "default value" when rendering on the server but have no information which values the vnode would have, only the binding which might not be enough.

One use case would be altering classes based on dedupe-logic (e.g. merging tailwind classes).

What is actually happening?

vNode is always null

System Info

No response

Any additional comments?

A workaround would be using component + slots, but that seems tedious if used for a huge amount of elements.

Metadata

Metadata

Assignees

No one assigned

    Labels

    has workaroundA workaround has been found to avoid the problemscope: ssr

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions