Skip to content

Carousel - remove unsafe method #941

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 11 commits into from
Sep 29, 2020
Merged

Conversation

Inbal-Tish
Copy link
Collaborator

No description provided.

Copy link
Collaborator

@ethanshar ethanshar left a comment

Choose a reason for hiding this comment

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

I pushed a fix to the file code format, I think you formatted it before we fixed .prettierrc config.

Anyway, try to add description to PRs even when seem trivial (unless it's a one line fix)
I won't necessarily be the one that review them and it's important to understand what you fix here and how.

}

static getDerivedStateFromProps(nextProps, prevState) {
const {currentPage, prevProps} = prevState;
Copy link
Collaborator

Choose a reason for hiding this comment

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

Is there a reason to keep the whole "prevProps" in state?
Why not just keep the initialPageWidth in state and check against its value.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I'm using 'pageWidth', 'containerMarginHorizontal', 'loop' for the prevProps and passing them to 'presenter.calcOffset()'

Copy link
Collaborator

Choose a reason for hiding this comment

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

👍

@ethanshar ethanshar merged commit b1edb63 into master Sep 29, 2020
@Inbal-Tish Inbal-Tish deleted the infra/Carousel_remove_UNSAFE branch September 29, 2020 18:24
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