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

Add persistent layout support #3288

Closed
wants to merge 2 commits into from
Closed

Add persistent layout support #3288

wants to merge 2 commits into from

Conversation

clemencov
Copy link

Persistent layout implementation, inspired by closed PR #2440.

@frol
Copy link
Contributor

frol commented Nov 15, 2017

How exactly does this help given there is a natural way of compositing React components: https://github.com/zeit/next.js/tree/canary/examples/layout-component ?

@clemencov
Copy link
Author

clemencov commented Nov 15, 2017

State persistence over page transitions (media players, notifications, chat scroll positions).
Few discussions in: #3200, #88

@frol
Copy link
Contributor

frol commented Nov 15, 2017

@clemencov

This actually won't fix #88 since ReactDOM.render is still called on page changes.

(c) @timneutkens (#2440 (comment))

@clemencov
Copy link
Author

clemencov commented Nov 15, 2017

Yes, it doesn't help much with animations, but until renderReactElement function is not calling ReactDOM's unmountComponentAtNode, React will not unmount the Layout component and relying to this we can use it as a persistent top-level component.

@rauchg
Copy link
Member

rauchg commented Nov 20, 2017

I definitely want this, but I don't think we need the concept of a single global layout. One of the ideas I had was that we could put a key or attribute on the top level component. If it matches the one of the next page, we retain that top level component.

@tz5514
Copy link

tz5514 commented Dec 7, 2017

@rauchg Is there any schedule for this important feature?
Lots of developer want this #88.
We really really hope that this feature can be implemented as soon.
Thanks!

@timneutkens
Copy link
Member

Closing in favor of #4129

@timneutkens timneutkens closed this Apr 9, 2018
@lock lock bot locked as resolved and limited conversation to collaborators Apr 9, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants