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

Complete the partial memoization of provider #427

Merged
merged 9 commits into from
Sep 1, 2023

Conversation

Noitidart
Copy link
Contributor

@Noitidart Noitidart commented Aug 29, 2023

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.

src/SafeAreaContext.tsx Outdated Show resolved Hide resolved
src/SafeAreaContext.tsx Outdated Show resolved Hide resolved
@Noitidart
Copy link
Contributor Author

I'm not able to get the snapshot tests updated, can I please get some help to update the snapshots. Running yarn test is giving me java errors which I'm not able to fix.

@jacobp100
Copy link
Collaborator

Run yarn jest -u

@Noitidart
Copy link
Contributor Author

Thanks! Updated!

@janicduplessis
Copy link
Member

Looks good, thanks for this!

@janicduplessis janicduplessis merged commit c862c86 into th3rdwave:main Sep 1, 2023
1 check passed
@Noitidart
Copy link
Contributor Author

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
([#&#8203;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
([#&#8203;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
([#&#8203;394](https://togithub.com/th3rdwave/react-native-safe-area-context/pull/394))
- set namespace in build.gradle
([#&#8203;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
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants