Skip to content

Computed value not updated in SSR #5300

Closed
@SquidEpps

Description

@SquidEpps

Version

3.2.27

Reproduction link

github.com

Steps to reproduce

yarn

node index.js

What is expected?

Computed value is updated and html renders with correct message.

<div>hello world</div>

What is actually happening?

Computed value is not updated and an empty div is rendered.

<div></div>

I'm not sure if this a bug or is it me misusing computed in SSR context, but such an app architecture as in my reproduction demo seems to me completely valid and should work.

There is a computed value in a component which is based on part of app's state. No value serves as indication of the need to fetch data. Normally this should happen either during SSR or on the client if the state (or its part) was not hydrated. Async setup function allows to wait for data to be fetched which should trigger an update of state and computed value.

This acually worked in 3.2.26. New behavior was possibly introduced in commit f4f0966

Metadata

Metadata

Assignees

No one assigned

    Labels

    ❗ p4-importantPriority 4: this fixes bugs that violate documented behavior, or significantly improves perf.🐞 bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions