Over the last few years, I've collected a list of valuable tips while developing and writing web applications. Some are clever, some I use almost every day, and some are more advanced — but they're all useful.
Nuxt Tip: Managing Page Load States With useLoadingIndicator
Learn how to use the useLoadingIndicator composable in Nuxt to access and manage the loading state of your app's pages.
Vue Tip: Use effectScope for Managing and Cleaning Up Reactive Effects
effectScope can be used to group and cleanup multiple reactive effects.
Nuxt Tip: Parallel Fetch Requests
Learn to wield useAsyncData along with Promise.
Nuxt Tip: Fetch Data on the Server Before App Start
Learn how to pre-fetch data on the server before app start in Nuxt 3+ to improve load times and user experience.
Nuxt Tip: Validate Data in Your Server Routes
Ensure that your data are valid and safe in your Nuxt server routes before processing them.
Vue Tip: Simple Routing Without Using External Libraries
If you want to keep things simple and avoid adding extra dependencies, you can implement basic routing functionality in Vue.
Vue Tip: Cache Component Instances With the KeepAlive Component
KeepAlive is a built-in Vue component that allows you to conditionally cache component instances when dynamically switching between multiple components.
Nuxt Tip: Change Status Code of the Response
`setResponseStatus` is a Nuxt composable to set the status code and (and optionally the status message) of the response.