Quasar: Unnecessary re-renders Q-components

Created on 3 May 2020  路  2Comments  路  Source: quasarframework/quasar

Describe the bug
Useless re-renders of components on parent update

Codepen/jsFiddle/Codesandbox (required)
https://codepen.io/alexdee2007/pen/LYpObve

To Reproduce
Steps to reproduce the behavior:

  1. Open console
  2. Enter some text into field "Text1" -> Vue re-renders all four q-inputs as well as q-btn

Expected behavior
In console:

"updated" "Text1"

What is actually happening?
In console:

"updated" "Text1"
"updated" "Text2"
"updated" "Text3"
"updated" "Text4"
"updated" "Button"

Platform (please complete the following information):
OS:
Node:
NPM:
Yarn:
Browsers:
iOS:
Android:
Electron:

Additional context
Using $listeners and/or $attrs in component's render function causes the component to be rendered whenever its parent is updated even though his props hasn't changed.
It causes high performance impact when using e.g. form with a lot of q-inputs.

Related to https://github.com/vuejs/vue/issues/7257 and https://github.com/vuejs/vue/issues/10115

There are workarounds, e.g. vuetify or bootstrap-vue

bug

All 2 comments

Hi, we actually noticed this too and were preparing a workaround.

Perf improvements will be available in "quasar" v1.10.1.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

florensiuslaylim picture florensiuslaylim  路  3Comments

xereda picture xereda  路  3Comments

alexeigs picture alexeigs  路  3Comments

mesqueeb picture mesqueeb  路  3Comments

slowaways picture slowaways  路  3Comments