quadralift
HMR Loading with Nuxt Page Refs
Im currently trying to implement a reactive expose system for an existing application. Some nuxt pages can expose a title and description which a grandparent component can access. It takes the data to make it reactive, but im not sure if I've implemented it correctly. Basically my
BaseTabContainer
handles a tab list (like your browser tabs) and also renders a BaseTabComponent
that wraps a NuxtPage
. We're exposing a title and description from the NuxtPage
-> BaseTabComponent
and then we're exposing the nuxtPageRef to the BaseTabContainer
. My system works except when an HMR load occurs, since HMR loads reset refs (at least thats what im guessing).
TL;DR -> HMR loads reset the nuxtPageRef and messes up my code. This isnt a bug in production since HMR stuff is for developers, but it becomes quite annoying.5 replies