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: skip reconciling event for synchronous onContextChange operations #931

Merged
merged 2 commits into from
May 6, 2024

Conversation

beeme1mr
Copy link
Member

@beeme1mr beeme1mr commented May 3, 2024

This PR

  • skips emitting a reconciling event for synchronous onContextChange operations

Notes

This will avoid unexpected component rerenders for synchronous onContextChange operations.

The spec states that the SDK may avoid emitting the PROVIDER_RECONCILING if a provider can reconcile synchronously.

https://openfeature.dev/specification/sections/events#event-handlers-and-context-reconciliation

@beeme1mr beeme1mr requested a review from a team as a code owner May 3, 2024 15:19
@toddbaert toddbaert self-requested a review May 3, 2024 15:55
Copy link
Member

@toddbaert toddbaert left a comment

Choose a reason for hiding this comment

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

Approving, consider this.

Signed-off-by: Michael Beemer <[email protected]>
@toddbaert toddbaert added this pull request to the merge queue May 6, 2024
Merged via the queue into main with commit 6c25f29 May 6, 2024
9 checks passed
@toddbaert toddbaert deleted the sync-oncontextchange branch May 6, 2024 18:17
toddbaert added a commit that referenced this pull request May 13, 2024
🤖 I have created a release *beep* *boop*
---


##
[1.1.0](web-sdk-v1.0.3...web-sdk-v1.1.0)
(2024-05-13)


### ✨ New Features

* set context during provider init on web
([#919](#919))
([7e6c1c6](7e6c1c6))


### 🐛 Bug Fixes

* remove export of OpenFeatureClient
([#794](#794))
([3d197f2](3d197f2))
* removes exports of OpenFeatureClient class and makes event props
readonly ([#918](#918))
([e9a25c2](e9a25c2))
* run error hook when provider returns reason error or error code
([#926](#926))
([c6d0b5d](c6d0b5d))
* skip reconciling event for synchronous onContextChange operations
([#931](#931))
([6c25f29](6c25f29))


### 🧹 Chore

* **main:** release core 1.2.0
([#927](#927))
([692ad5b](692ad5b))


### 📚 Documentation

* add tip about supported usage in the install section
([#941](#941))
([f0de667](f0de667))

---
This PR was generated with [Release
Please](https://github.com/googleapis/release-please). See
[documentation](https://github.com/googleapis/release-please#release-please).

Signed-off-by: OpenFeature Bot <[email protected]>
Signed-off-by: Todd Baert <[email protected]>
Co-authored-by: Todd Baert <[email protected]>
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.

4 participants