Skip to content

getters result doesn't get cached #2102

Closed
@BoHuny

Description

@BoHuny

Version

4.0.2

Reproduction link

codesandbox.io

Steps to reproduce

  • Instanciate a Vuex store
  • Call a getter multiple times without change in the parameters
  • The getter gets called each time as the result isn't cached

What is expected?

The getter function should be computed once only (as in this Vue 2 minimal reproduction: https://codesandbox.io/s/interesting-cerf-22fu3?file=/src/main.js)

What is actually happening?

The getter function is called each time


Vue version: 3.2.26 (doesn't work on 3.1.5/3.0.11 neither)

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