[Vuejs]-Vue.js website: Extreme energy consumption โ€“ how to find culprits?

3๐Ÿ‘

I have a quite a few watchers that keep an eye on vuex states, because it would be a stupid amount of work to pass information up and
down components. This has led to a massive store.js file with a ton of
variables that are used all over my application.

Why do you use observatories for vuex states? In reality, the information stored in the vuex stores are already reactive with respect to the components so it should not be necessary to use observers.

I also use computed properties a lot

The computed properties are very heavy for the system to manage, they should be used sparingly and above all only and only where they are strictly necessary.

I have a couple event listeners on events like resizing the window

Make sure you delete the event listener once the component is destroyed

๐Ÿ‘คFrancesco

Leave a comment