-
-
Notifications
You must be signed in to change notification settings - Fork 193
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
Complete the partial memoization of provider #427
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
It should only change reference if setFrame or setInsets change, which should be never. Related: th3rdwave#426
Related: th3rdwave#426
Noitidart
commented
Aug 29, 2023
Noitidart
commented
Aug 29, 2023
jacobp100
approved these changes
Aug 29, 2023
I'm not able to get the snapshot tests updated, can I please get some help to update the snapshots. Running |
Run |
Thanks! Updated! |
janicduplessis
approved these changes
Sep 1, 2023
Looks good, thanks for this! |
Thank you! |
renovate bot
added a commit
to valora-inc/wallet
that referenced
this pull request
Oct 15, 2023
…#4314) [![Mend Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [react-native-safe-area-context](https://togithub.com/th3rdwave/react-native-safe-area-context) | [`^4.5.3` -> `^4.7.2`](https://renovatebot.com/diffs/npm/react-native-safe-area-context/4.5.3/4.7.2) | [![age](https://developer.mend.io/api/mc/badges/age/npm/react-native-safe-area-context/4.7.2?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://developer.mend.io/api/mc/badges/adoption/npm/react-native-safe-area-context/4.7.2?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://developer.mend.io/api/mc/badges/compatibility/npm/react-native-safe-area-context/4.5.3/4.7.2?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/npm/react-native-safe-area-context/4.5.3/4.7.2?slim=true)](https://docs.renovatebot.com/merge-confidence/) | --- ### Release Notes <details> <summary>th3rdwave/react-native-safe-area-context (react-native-safe-area-context)</summary> ### [`v4.7.2`](https://togithub.com/th3rdwave/react-native-safe-area-context/releases/tag/v4.7.2): Release 4.7.2 [Compare Source](https://togithub.com/th3rdwave/react-native-safe-area-context/compare/v4.7.1...v4.7.2) - Complete the partial memoization of provider ([th3rdwave/react-native-safe-area-context#427) ### [`v4.7.1`](https://togithub.com/th3rdwave/react-native-safe-area-context/releases/tag/v4.7.1): Release 4.7.1 [Compare Source](https://togithub.com/th3rdwave/react-native-safe-area-context/compare/v4.7.0...v4.7.1) - Update podspec to tvOS 12.4 ([#​415](https://togithub.com/th3rdwave/react-native-safe-area-context/issues/415)) ### [`v4.7.0`](https://togithub.com/th3rdwave/react-native-safe-area-context/releases/tag/v4.7.0): Release 4.7.0 [Compare Source](https://togithub.com/th3rdwave/react-native-safe-area-context/compare/v4.6.4...v4.7.0) ##### Bug Fixes - use install_modules_dependencies to make fabric build more reliable ([664c518](https://togithub.com/th3rdwave/react-native-safe-area-context/commit/664c518e0cdbbeb7432d71787edc19ae6841538e)) - use RCT_NEW_ARCH_ENABLED in RNCSafeAreaContext module ([720cbc9](https://togithub.com/th3rdwave/react-native-safe-area-context/commit/720cbc94b2668ad96e3b877a25dea654c4aef3b5)) - Fixes for tvOS ([th3rdwave/react-native-safe-area-context#412) ### [`v4.6.4`](https://togithub.com/th3rdwave/react-native-safe-area-context/releases/tag/v4.6.4): Release 4.6.4 [Compare Source](https://togithub.com/th3rdwave/react-native-safe-area-context/compare/v4.6.3...v4.6.4) - Update safe area frame when keyboard shows/hides ([th3rdwave/react-native-safe-area-context#407) ### [`v4.6.3`](https://togithub.com/th3rdwave/react-native-safe-area-context/releases/tag/v4.6.3): Release 4.6.3 [Compare Source](https://togithub.com/th3rdwave/react-native-safe-area-context/compare/v4.6.2...v4.6.3) ##### Bug Fixes - make edge types readonly ([def6c1f](https://togithub.com/th3rdwave/react-native-safe-area-context/commit/def6c1fbbce41f791c39617cc13b7eac66ddedde)) ### [`v4.6.2`](https://togithub.com/th3rdwave/react-native-safe-area-context/releases/tag/v4.6.2): Release 4.6.2 [Compare Source](https://togithub.com/th3rdwave/react-native-safe-area-context/compare/v4.6.1...v4.6.2) - Cast View to the NativeSafeAreaViewInstance for .macos and .windows to get the correct type definitions ([th3rdwave/react-native-safe-area-context#404) ### [`v4.6.1`](https://togithub.com/th3rdwave/react-native-safe-area-context/releases/tag/v4.6.1): Release 4.6.1 [Compare Source](https://togithub.com/th3rdwave/react-native-safe-area-context/compare/v4.6.0...v4.6.1) ##### Bug Fixes - Fix type declaration path in package.json ([#​400](https://togithub.com/th3rdwave/react-native-safe-area-context/issues/400)) ([ce5e856](https://togithub.com/th3rdwave/react-native-safe-area-context/commit/ce5e856999f7100c031b6d76727275c6919de412)) ### [`v4.6.0`](https://togithub.com/th3rdwave/react-native-safe-area-context/releases/tag/v4.6.0): Release 4.6.0 [Compare Source](https://togithub.com/th3rdwave/react-native-safe-area-context/compare/7b2718703a96b5b140be944ae96e53a562533b37...v4.6.0) ##### Features - maximum padding ([#​394](https://togithub.com/th3rdwave/react-native-safe-area-context/pull/394)) - set namespace in build.gradle ([#​399](https://togithub.com/th3rdwave/react-native-safe-area-context/pull/399)) ##### Bug Fixes - allow providing insets in hook mocks ([f1d9e52](https://togithub.com/th3rdwave/react-native-safe-area-context/commit/f1d9e523dc0b0d6a205db5df65ca5b1c20893038)) ### [`v4.5.5`](https://togithub.com/th3rdwave/react-native-safe-area-context/compare/219e700c93bff720f9ea64bdeff2bc5c32a4aaee...7b2718703a96b5b140be944ae96e53a562533b37) [Compare Source](https://togithub.com/th3rdwave/react-native-safe-area-context/compare/219e700c93bff720f9ea64bdeff2bc5c32a4aaee...7b2718703a96b5b140be944ae96e53a562533b37) ### [`v4.5.4`](https://togithub.com/th3rdwave/react-native-safe-area-context/compare/v4.5.3...219e700c93bff720f9ea64bdeff2bc5c32a4aaee) [Compare Source](https://togithub.com/th3rdwave/react-native-safe-area-context/compare/v4.5.3...219e700c93bff720f9ea64bdeff2bc5c32a4aaee) </details> --- ### Configuration 📅 **Schedule**: Branch creation - "after 5pm,every weekend" in timezone America/Los_Angeles, Automerge - "after 5pm,every weekend" in timezone America/Los_Angeles. 🚦 **Automerge**: Enabled. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box --- This PR has been generated by [Mend Renovate](https://www.mend.io/free-developer-tools/renovate/). View repository job log [here](https://developer.mend.io/github/valora-inc/wallet). <!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNy44LjEiLCJ1cGRhdGVkSW5WZXIiOiIzNy44LjEiLCJ0YXJnZXRCcmFuY2giOiJtYWluIn0=--> --------- Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> Co-authored-by: valora-bot <valorabot@valoraapp.com> Co-authored-by: Satish Ravi <satish.ravi@valoraapp.com>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Summary
I saw some memoization in the provider. It was just partial memoization. I thought to complete the memoization. I'm not sure of the implications memoization had, but partial memoization defeats the purpose. Related: #426
The first commit to use the setState callbacks that one I'm very confident about. Memoizing the whole component in the third commit, and memozing style, I'm not sure if any benefits. But it completes the memoizing.
Test Plan
Old tests still stand.