Skip to content

What is the intended use of AppLayout #102

Answered by timogasda
lordnynex asked this question in Q&A
Discussion options

You must be logged in to vote

Hello,

despite of what the name "App layout" might suggest, the component doesn't necessarily need to be one global instance per application, but it can be. Picking between one global App layout or one "local" App layout per page depends on your use-case and general code architecture. Both approaches are valid but might have different pros and cons.

If you find it difficult to synchronize content header and content for one App layout instance, you can use one App layout per page. For example: https://codesandbox.io/s/inspiring-meadow-06e5ws?file=/src/App.jsx

You can also use hooks to communicate changes to your global App layout from the content. For example: https://codesandbox.io/s/frie…

Replies: 3 comments 1 reply

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
1 reply
@lordnynex
Comment options

Answer selected by lordnynex
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants