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

Reduce refreshes and allow partial zoom control #5

Merged
merged 9 commits into from
Apr 29, 2022

Conversation

sjustason
Copy link

@sjustason sjustason commented Apr 26, 2022

A couple of changes:

  • Add new props that allow us to de-couple changes triggered by remote zoom, and the always updated internal state of visibleTime; This basically allows for partial control as opposed to the full control triggered with the use of visibleTime

I'd like to investigate the comparison in getDerivedStateFromProps:

    const forceUpdate = items !== prevState.items || groups !== prevState.groups

Since I'm not sure this comparison is always accurate and may be identifying changes when there are none, but that will be a separate ticket.

@sjustason sjustason marked this pull request as ready for review April 26, 2022 21:57
@sjustason sjustason changed the title Reduce refreshes and remote allow zoom control Reduce refreshes and allow partial zoom control Apr 28, 2022
Copy link
Collaborator

@JustinmClapperton JustinmClapperton left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Based on testing in the other PR. This library looks good as well for now. I know you mentioned you might have an idea about not using getDerivedStateFromProps but I assume you plan to do that in a future update.

@sjustason sjustason merged commit 901333b into master Apr 29, 2022
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.

2 participants