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

FF-react #5164

Merged
merged 8 commits into from
Apr 3, 2023
Merged

FF-react #5164

merged 8 commits into from
Apr 3, 2023

Conversation

davidbielik
Copy link
Contributor

@davidbielik davidbielik commented Mar 30, 2023

code samples for react FF

@cla-bot cla-bot bot added the cla-signed label Mar 30, 2023
@vercel
Copy link

vercel bot commented Mar 30, 2023

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
braze-docs-en ✅ Ready (Inspect) Visit Preview 💬 Add feedback Apr 3, 2023 2:52pm
1 Ignored Deployment
Name Status Preview Comments Updated (UTC)
braze-docs-fr ⬜️ Ignored (Inspect) Apr 3, 2023 2:52pm

{% tab React Native %}
```javascript
// string properties
const stringProperty = await braze.getFeatureFlagStringProperty("color");
Copy link
Contributor

Choose a reason for hiding this comment

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

The property methods are supposed to take in two params: ("flag-id", "property-key");

Suggested change
const stringProperty = await braze.getFeatureFlagStringProperty("color");
const stringProperty = await braze.getFeatureFlagStringProperty("my_flag", "color");

Co-authored-by: Jeriel Ng <jerielng@users.noreply.github.com>
@@ -138,6 +138,16 @@ if (featureFlag.enabled) {
}
```
{% endtab %}
{% tab React Native %}
```javascript
const featureFlag = await braze.getFeatureFlag("expanded_user_profile");
Copy link
Contributor

Choose a reason for hiding this comment

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

Regarding your note about Braze vs braze, I know in the sample app we have it as Braze, but I'm not sure if that's a TS convention. If it were Swift, we would lowercase it unless it was a static reference. @wesleyorbin do you have any thoughts?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

yea, in theory it could be:

import David from "braze-react-native-sdk"

So probably doesn't matter that much, but i'll change it to Braze to match the sample app.

Co-authored-by: Jeriel Ng <jerielng@users.noreply.github.com>
Co-authored-by: Jeriel Ng <jerielng@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants