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

Added useFeatureFlagWithPayload for react native #111

Merged
merged 4 commits into from
Oct 6, 2023

Conversation

Jonatthu
Copy link
Contributor

@Jonatthu Jonatthu commented Sep 25, 2023

Enabling feature flags with payload, this should be essential to have...

Problem

Enables feature flags with payload for react native

Changes

It just exposes a new hook for this.

Release info Sub-libraries affected

Bump level

  • Major
  • Minor
  • Patch

Libraries affected

  • All of them
  • posthog-web
  • posthog-node
  • posthog-react-native

Changelog notes

  • Added support for feature flags payload for react native useFeatureFlagWithPayload

@Jonatthu Jonatthu changed the title Update useFeatureFlag.ts Added useFeatureFlagWithPayload for react native Sep 26, 2023
Copy link
Collaborator

@benjackwhite benjackwhite left a comment

Choose a reason for hiding this comment

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

This is a great addition! One small tweak requested as I feel its important we get the lifecycle right. If you don't have time, let me know and I can create a PR to go in that direction

posthog-react-native/src/hooks/useFeatureFlag.ts Outdated Show resolved Hide resolved
@Jonatthu
Copy link
Contributor Author

@benjackwhite I think this is ready to go!

@Jonatthu Jonatthu changed the title Added useFeatureFlagWithPayload for react native Added useFeatureFlagWithPayload for react native and new Sentry Integration Sep 26, 2023
@Jonatthu

This comment was marked as off-topic.

Copy link
Member

@marandaneto marandaneto left a comment

Choose a reason for hiding this comment

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

@Jonatthu can you split the PR into 2 PRs, one for the useFeatureFlagWithPayload and the other one for the Sentry integration? it's pretty much a copy and paste.
The idea is that if something goes wrong, we can easily revert, it's also easier to read the history of changes.
Thanks for doing this.

Enabling feature flags with payload, this should be essential to have...
@Jonatthu Jonatthu changed the title Added useFeatureFlagWithPayload for react native and new Sentry Integration Added useFeatureFlagWithPayload for react native Sep 27, 2023
@Jonatthu
Copy link
Contributor Author

@marandaneto Done

Copy link
Member

@marandaneto marandaneto left a comment

Choose a reason for hiding this comment

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

@marandaneto Done

thanks, feel free to open a new PR with the Sentry bits.

Copy link
Member

@marandaneto marandaneto left a comment

Choose a reason for hiding this comment

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

LGTM but let's wait @benjackwhite to double-check it since he requested changes.

@marandaneto
Copy link
Member

@Jonatthu please add an entry to the changelog so we can get it merged, thanks for the PR.

@Jonatthu
Copy link
Contributor Author

Jonatthu commented Oct 5, 2023

@marandaneto Done, Can we merge it now?

@marandaneto marandaneto merged commit dcd429a into PostHog:master Oct 6, 2023
2 checks passed
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