Skip to content

Conversation

@pavkam
Copy link
Contributor

@pavkam pavkam commented Feb 20, 2025

  • Introduce onFeaturesUpdated callback in BucketProvider to allow custom handling of feature updates
  • Add new useClient() hook to access the BucketClient directly
  • Refactor hooks to use useClient() for simplified client access
  • Update README with documentation for new features

- Introduce `onFeaturesUpdated` callback in BucketProvider to allow custom handling of feature updates
- Add new `useClient()` hook to access the BucketClient directly
- Refactor hooks to use `useClient()` for simplified client access
- Update README with documentation for new features
@pavkam pavkam self-assigned this Feb 20, 2025
@pavkam pavkam requested a review from roncohen February 20, 2025 05:28
@roncohen
Copy link
Contributor

useClient is great! And I really like the refactor to remove ensureProvider - lets get that in!

I don't particularly like exposing onFeaturesUpdated directly. It's very specific. Since we have useClient() people can achieve the same with a on with what they get from useClient() and have access to all the events? I say let's skip that for now, but get the rest in!

…re update handling

- Remove `onFeaturesUpdated` callback from BucketProvider
- Simplify feature update event listener to directly set raw features
- Expose `Feature` type for external use
- Add `useClient()` hook test to ensure proper functionality
@pavkam
Copy link
Contributor Author

pavkam commented Feb 20, 2025

useClient is great! And I really like the refactor to remove ensureProvider - lets get that in!

I don't particularly like exposing onFeaturesUpdated directly. It's very specific. Since we have useClient() people can achieve the same with a on with what they get from useClient() and have access to all the events? I say let's skip that for now, but get the rest in!

removed the callback. Give it a 👍🏽 when you can

@pavkam pavkam merged commit 8cdade6 into browser-react-3.0.alpha Feb 20, 2025
5 checks passed
@pavkam pavkam deleted the add-features-updated-event branch February 20, 2025 13:02
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.

2 participants