Vue Devtools 5 has been released. This is, without a doubt, the most significant update since the initial release. There are three new tabs include Routing, Performance, and Settings. Other cool features include editable Vuex state and a major boost in speed and memory efficiency.
Prop types are a really simple way to catch a lot of potential errors. Here are some great tips on how to use them effectively. My favorite here is to use a validator for enforcing a list of string values.
Vuex will generally be the right choice for state management for Vue apps. But consider Mobx for state management that is framework agnostic, has built-in observable fields, is simple, has little boilerplate, and has superior performance.
Sometimes we don’t need complex components, and in some cases, we don’t even need them to have a state. Here functional components can be used, as they are simple to reason about, faster and more lightweight.
Here are a few tricks and tips that the author has found while working in Vue for the last two years, like using the same ref value to return an array of elements, and adding global variables with Webpack’s DefinePlugin, and more.