No More Posting New Topics!

If you have a question or an issue, please start a thread in our Github Discussions Forum.
This forum is closed for new threads/ topics.

Navigation

    Quasar Framework

    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search

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

    Help
    4
    5
    720
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • P
      peterPanParker last edited by peterPanParker

      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…

      1 Reply Last reply Reply Quote 2
      • Hawkeye64
        Hawkeye64 last edited by

        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.

        1 Reply Last reply Reply Quote 0
        • P
          peterPanParker last edited by

          ok, thanks for answer

          1 Reply Last reply Reply Quote 0
          • P
            potatoheadgear last edited by

            a more detailed answer to this question would be REALLY nice since I have the same confusions

            1 Reply Last reply Reply Quote 0
            • metalsadman
              metalsadman last edited by

              All are components regardless, they are just organized in certain folders as explained by @Hawkeye64 . Layout is the parent component of your route it usually hold a page, both can have components coming from the Components folder. Think like a hierarchy of Layout > Page.

              1 Reply Last reply Reply Quote 0
              • First post
                Last post