-
Let's say we have two models:
Next we have a prop with chatId:
And we can find the chat:
Also, using the same
And after all, we pass that related item to some component:
The problem happens when I update the parent model, let's say:
After that code our component (some-component) will be re-rendered, because changing the parent model affect our child. How to prevent that? Because actually the child is the same, he wasn't changed. I have a lot of related items which force a lot of components to be updated every time I update any parent field. This makes page super slow. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 2 replies
-
It's really hare to say what the real reason for your slow behaviour is, because computed of course updates whehn something releated to the value changes. Thats normal behaviour. Normally you can adjust how components are updates by using |
Beta Was this translation helpful? Give feedback.
It's really hare to say what the real reason for your slow behaviour is, because computed of course updates whehn something releated to the value changes. Thats normal behaviour. Normally you can adjust how components are updates by using
if
conditions or functions called async and using suspense. There many ways many reasons.Please make a repdroduction in codesandbox or stackblitz. Then i can tell you if its pinia-orm related or just a reactivity problem.
The reactivity hell runs often in circles 😆