D
D
Daksin2021-11-14 17:05:38
Vue.js
Daksin, 2021-11-14 17:05:38

How to pass props to nuxt layout?

How do I pass props for pages to layout?
my code:

<template>
  <div>
    <div class="container">
      <Nav class="nav"/>
      <div class="layout">
        <Sidebar v-model="filter"/>
        <nuxt :requests="requests"/> // вот сюда
      </div>
    </div>
    <to-top/>
  </div>
</template>

Answer the question

In order to leave comments, you need to log in

1 answer(s)
I
Ice, 2021-11-14
@IceRD

Something dubious you do if you try to throw props in layouts
Think to throw it better in store (vuex), read about nuxtServerInit
There is a middleware for management or maybe in your case you can solve it through global plugins (mixin)
I think you will get a more detailed answer if you give more information to your question.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question