Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Import Layout Component in _app.tsx Instead of Pages #562

Open
otobot1 opened this issue Sep 24, 2023 · 0 comments
Open

Import Layout Component in _app.tsx Instead of Pages #562

otobot1 opened this issue Sep 24, 2023 · 0 comments
Labels
priority: medium type: performance Improve server and/or client performance
Milestone

Comments

@otobot1
Copy link
Member

otobot1 commented Sep 24, 2023

Is your feature request related to a problem? Please describe.
Currently the Layout component is imported directly in the Page component(s).

Describe the solution you'd like
Remove Layout import from Page components and import in _app.tsx instead. Can replace the passed-in props either with logic that chooses from hard-coded values based on the current url, or by passing setState functions down to the Layout's children.

Describe alternatives you've considered
N/A. The current solution works, but causes the entire layout to be unnecessarily re-rendered on every client-side transition.

Additional context
Follow-up to #546. Mentioned in this comment.

@otobot1 otobot1 added priority: medium type: performance Improve server and/or client performance labels Sep 24, 2023
@otobot1 otobot1 added this to the v0.2.0 milestone Sep 24, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
priority: medium type: performance Improve server and/or client performance
Projects
None yet
Development

No branches or pull requests

1 participant