Skip to content

Maximum recursive updates exceeded in component in 3.4.15 #10214

Closed
@treardon17

Description

@treardon17

Vue version

3.4.15

Link to minimal reproduction

https://play.vuejs.org/#eNqNU01v2kAQ/SsjXwA12I1oLxRQmiiV2kOLmh59MfZATL0f2p0lRMj/vbO7QI3bRLl5Z+bNvPfGc0g+a53uHCbTZGZLU2sCi+T0Ipe10MoQHKBUQjvCClpYGyVgwPWDTl6jsUp+KUpS5vlclGbLEB98ymUuSyUtgTZKW5hDheta4tK/hodcAshC4BTCJwA9a348kKnl5iqGGFC4hqYwuFUrng3Q5rIddVuHYdz7xHY4HMF8cUluGAikftrIg2dZ1Mxq+UEodFMQ8gtgVtW7xeEkLkDSXdE4hLadZT7p4R1IcpVER8ai0OmWQexpUJQfEzZPzhrzhE307zx5JNJ2mmVlJRlWYVPvTCqRMqlFdsNlmXGSaoHjSombSfohvf7IBCx14ylaMV4Z9WTRcJc8ORoX5mQc3KEZG5QVGjRvnduDXczu5f6Zf9oR20KWV7SuNz1T/KLqBs0PTTWv8MKcomnU07cQI+PwLKZ8xPL3f+Jbu4+ilgYDs44BVJgNUkzfP3zHPX+fk0JVrjku4oXkT7SqcZ5jLLt1smLanbrA9mvYMf+yv+z9nlDakyhPNLgR6sNC7l6R/pfuJJ10XIzXxB6yg+fTM7juXeXlPdwp/kX4KLhu+D6eC+4Ddu1k6Yf3DiScRiQT+6jVlvFHdvFMfbNQFwS1oSt0Bx4P5d0crjkJDCBnpG/FT5aTtH8AoE2GOg==

Steps to reproduce

Open the link and see the maximum recursion error

What is expected?

No maximum recursion error

What is actually happening?

Maximum recursion error

System Info

System:
    OS: macOS 14.1.1
    CPU: (12) arm64 Apple M2 Max
    Memory: 65.34 MB / 32.00 GB
    Shell: 5.9 - /bin/zsh
  Binaries:
    Node: 18.13.0 - ~/.nvm/versions/node/v18.13.0/bin/node
    Yarn: 1.22.19 - /usr/local/bin/yarn
    npm: 8.19.3 - ~/.nvm/versions/node/v18.13.0/bin/npm
    pnpm: 8.8.0 - ~/Library/pnpm/pnpm
  Browsers:
    Brave Browser: 120.1.61.120
    Chrome: 120.0.6099.234
    Safari: 17.1

Any additional comments?

I understand that computed properties should not have side effects, and this example does have a side effect, however there are some cases where classes/factories might modify some global reactive state for tracking purposes. In 3.4.14 and before this example works, but this breaks in 3.4.15.

In an ideal world, obviously nobody would ever modify anything inside of a getter, making all getters "pure" functions. I don't know if this is necessarily a realistic requirement in the real world, especially if all previous versions of Vue 3 (whether intentionally or unintentionally) supported this.

I believe other people are possibly running into this issue:
#10210
#10172
#10158

I'm pretty confident that this PR introduced this behavior: #10123

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions