Skip to content

[JetSnack] Move scroll state reads into layout phase via lambdas #778

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

Merged
merged 1 commit into from
Apr 13, 2022

Conversation

bentrengrove
Copy link
Member

@bentrengrove bentrengrove commented Apr 13, 2022

Fixes janky scrolling on the JetSnack details page.
Fixes #231

It should not be necessary to recompose just to relayout a page. JetSnack has a collapsing toolbar like layout on the details page, it shrinks the image and moves the title text up on scroll. This was previously done using composition but by moving the read of the scroll value into a lambda, we can read the value only during layout and skip the composition phase entirely.

@bentrengrove bentrengrove merged commit e9f5d03 into main Apr 13, 2022
@bentrengrove bentrengrove deleted the ben/recomp_counts branch April 13, 2022 23:58
@wnduqrla
Copy link

wnduqrla commented Oct 1, 2022

Your idea is so impressive for me.
Thank you 👍

@manosbatsis
Copy link

Great example for explaining this within my team. Thank you @bentrengrove !

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Jetsnack] Vertical scrolling is janky
4 participants