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

(fix)(refactor) Memo'd component to avoid re-rendering upstream which has a bug #453

Merged
merged 6 commits into from Aug 4, 2020
Merged

Conversation

lukemcgregor
Copy link
Contributor

Overview

fixes #451, This PR memos the component to avoid triggering a re-render of the upstream library @react-native-community/datetimepicker which recreates the date picker on each render call. I have also converted to hooks while working out how to resolve this issue.

Was trying to debug an issue with value being reset, but it appears to have come from downstream
so that it only renders the underlying DateTimePicker once (or on date change)
@mmazzarolo
Copy link
Owner

Looks good to me, thank you @lukemcgregor ! Gonna test it and merge it :)

@mmazzarolo mmazzarolo merged commit 069b2ca into mmazzarolo:master Aug 4, 2020
mmazzarolo pushed a commit that referenced this pull request Aug 4, 2020
# [8.8.0](v8.7.1...v8.8.0) (2020-08-04)

### Features

* Memo'd Android component to avoid re-rendering upstream which has a bug ([#453](#453)) ([069b2ca](069b2ca))
@mmazzarolo
Copy link
Owner

🎉 This PR is included in version 8.8.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

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

Successfully merging this pull request may close these issues.

Android, date resets on parent re-render
2 participants