Skip to content

Commit

Permalink
chore: changed <Welcome> component to be a normal application
Browse files Browse the repository at this point in the history
  • Loading branch information
professorice committed Aug 28, 2024
1 parent 0728fdf commit 4dc3bf2
Showing 1 changed file with 8 additions and 4 deletions.
Original file line number Diff line number Diff line change
@@ -1,10 +1,14 @@
import { StyleSheet, Text, View } from 'react-native';
import { mockFlags, ldClientMock } from '@launchdarkly/jest/react-native';
import { useBoolVariation, useLDClient } from '@launchdarkly/react-native-client-sdk';

export default function Welcome() {
const flagValue = mockFlags({ 'dev-test-flag': true });

ldClientMock.track('test');
//TODO Set my-boolean-flag to a valid boolean flag key in your project/environment.
const flagValue = useBoolVariation('my-boolean-flag', false);

const ldClient = useLDClient();

ldClient.track('test event');

return (
<View style={styles.container}>
Expand All @@ -21,4 +25,4 @@ const styles = StyleSheet.create({
alignItems: 'center',
justifyContent: 'center',
},
});
});

0 comments on commit 4dc3bf2

Please sign in to comment.