Anyone who can explain me components/layouts/pages relationship please



  • Hi
    i am a little confused, i read the documentation and i understand that layouts has pages are injected using the router… then i read layouts are components but if so why directory structure is as follows in src directory:

    • components/

    • layouts/

    • pages/

    i can not understand what’s the difference between layouts and components, what should i save in each directory?

    thanks in advance…



  • Components are used by Pages, Pages are used by Layouts. There are no hard and fast rules here. This just really helps to organize your code.



  • ok, thanks for answer