NuxtN
Nuxt13mo ago
ethan!

hydration error

<NuxtLink :to="isAuth() ? '/servers' : '/api/auth'" :external="!isAuth()">
  <Button class="w-52 h-14 text-lg" variant="secondary">
    <Icon name="mdi:view-dashboard" size="25px" />
    Dashboard
  </Button>
</NuxtLink>

[Vue warn]: Hydration attribute mismatch on <a href=​"/​api/​auth">​…​</a>​ 
  - rendered on server: href="/api/auth"
  - expected on client: href="/servers"
  Note: this mismatch is check-only. The DOM will not be rectified in production due to performance overhead.
  You should fix the source of the mismatch. 
  at <RouterLink ref=fn to="/servers" activeClass=undefined  ... > 
  at <NuxtLink to="/servers" external=false > 
  at <Index onVnodeUnmounted=fn<onVnodeUnmounted> ref=Ref< undefined > > 
  at <Anonymous key="/" vnode= {__v_isVNode: true, __v_skip: true, type: {…}, props: {…}, key: null, …} route= {fullPath: '/', hash: '', query: {…}, name: 'index', path: '/', …}  ... > 
  at <RouterView name=undefined route=undefined > 
  at <NuxtPage> 
  at <Default ref=Ref< undefined > > 
  at <AsyncComponentWrapper ref=Ref< undefined > > 
  at <LayoutLoader key="default" layoutProps= {ref: RefImpl} name="default" > 
  at <NuxtLayoutProvider layoutProps= {ref: RefImpl} key="default" name="default"  ... > 
  at <NuxtLayout> 
  at <App key=4 > 
  at <NuxtRoot>

im getting this error as isAuth() starts as false then goes to true
Was this page helpful?