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

feat: allow access to sdk state #214

Merged
merged 1 commit into from
Jun 25, 2024
Merged

feat: allow access to sdk state #214

merged 1 commit into from
Jun 25, 2024

Conversation

Tymek
Copy link
Member

@Tymek Tymek commented Jun 14, 2024

About the changes

Push model for state changes is not enough when passing client to React SDK,
see Unleash/proxy-client-react#168

@Tymek Tymek marked this pull request as ready for review June 24, 2024 07:03
README.md Outdated Show resolved Hide resolved
README.md Outdated Show resolved Hide resolved
return this.readyEventEmitted;
}

public getError(): SdkState {
Copy link
Member

Choose a reason for hiding this comment

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

can we rename to "getLastError"?

Copy link
Member Author

@Tymek Tymek Jun 25, 2024

Choose a reason for hiding this comment

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

It has the logic to return undefined it when current SDK state is not an error. getLastError in my mind indicates that it returns last error even if SDK already recovered - that's not the case here

Copy link
Member

Choose a reason for hiding this comment

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

ok, thanks for clarifying. makes sense.

Copy link
Member

@ivarconr ivarconr left a comment

Choose a reason for hiding this comment

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

One method rename suggested. Other than that this looks good.

@Tymek Tymek merged commit e1ed616 into main Jun 25, 2024
3 checks passed
@Tymek Tymek deleted the feat/access-state branch June 25, 2024 11:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

3 participants