Skip to content

chore: Add FDv2 example project for react-native.#1277

Open
kinyoklion wants to merge 8 commits intomainfrom
rlamb/react-native-fdv2-example
Open

chore: Add FDv2 example project for react-native.#1277
kinyoklion wants to merge 8 commits intomainfrom
rlamb/react-native-fdv2-example

Conversation

@kinyoklion
Copy link
Copy Markdown
Member

@kinyoklion kinyoklion commented Apr 14, 2026

Note

Medium Risk
Mostly adds a new example app, but it also modifies the root Yarn workspaces list and packages/sdk/react-native/tsconfig.json excludes, which can affect installs/builds and CI behavior.

Overview
Adds a new packages/sdk/react-native/example-fdv2 Expo app workspace that initializes the RN SDK with the experimental dataSystem (FDv2) option and includes a simple UI to identify, evaluate a boolean flag, and toggle FDv2 connection modes via the internal setConnectionMode() API.

Updates the monorepo to include this workspace (root package.json) and prevents it from being picked up by the main React Native package TypeScript build (packages/sdk/react-native/tsconfig.json exclude).

Reviewed by Cursor Bugbot for commit 3f9c780. Bugbot is set up for automated code reviews on this repo. Configure here.

The public API shows setConnectionMode(mode: ConnectionMode) and
getConnectionMode(): ConnectionMode. The FDv2-specific overloads
accepting FDv2ConnectionMode and undefined are stripped from
declarations via @internal + stripInternal.
@kinyoklion kinyoklion changed the title Rlamb/react native fdv2 example chore: Add FDv2 example project for react-native. Apr 14, 2026
@github-actions
Copy link
Copy Markdown
Contributor

@launchdarkly/js-sdk-common size report
This is the brotli compressed size of the ESM build.
Compressed size: 25623 bytes
Compressed size limit: 29000
Uncompressed size: 125843 bytes

@kinyoklion kinyoklion marked this pull request as ready for review April 14, 2026 22:55
@kinyoklion kinyoklion requested a review from a team as a code owner April 14, 2026 22:55
@github-actions
Copy link
Copy Markdown
Contributor

@launchdarkly/browser size report
This is the brotli compressed size of the ESM build.
Compressed size: 179425 bytes
Compressed size limit: 200000
Uncompressed size: 830054 bytes

@github-actions
Copy link
Copy Markdown
Contributor

@launchdarkly/js-client-sdk size report
This is the brotli compressed size of the ESM build.
Compressed size: 31681 bytes
Compressed size limit: 34000
Uncompressed size: 112864 bytes

@github-actions
Copy link
Copy Markdown
Contributor

@launchdarkly/js-client-sdk-common size report
This is the brotli compressed size of the ESM build.
Compressed size: 37184 bytes
Compressed size limit: 38000
Uncompressed size: 204411 bytes

Copy link
Copy Markdown

@cursor cursor bot left a comment

Choose a reason for hiding this comment

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

Cursor Bugbot has reviewed your changes and found 2 potential issues.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, have a team admin enable autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit 3f9c780. Configure here.

version: '0.0.1',
},
baseUri: 'http://192.168.7.152:3002/proxy-poll',
streamUri: 'http://192.168.7.152:3001/proxy',
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Hardcoded local IP addresses in example app config

Medium Severity

The baseUri and streamUri are hardcoded to a developer-specific local network address (192.168.7.152), which won't work for anyone else cloning the repo. The existing example/App.tsx doesn't set these, relying on SDK defaults. These look like leftover development/debugging proxy configuration that was accidentally committed.

Fix in Cursor Fix in Web

Reviewed by Cursor Bugbot for commit 3f9c780. Configure here.

- "settings.json": contains the server configuration that is used to serve the application manifest.
> Should I commit the ".expo" folder?
No, you should not share the ".expo" folder. It does not contain any information that is relevant for other developers working on the project, it is specific to your machine.
Upon project creation, the ".expo" folder is already added to your ".gitignore" file.
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Committed .expo directory that should be gitignored

Low Severity

The .expo directory is committed, but its own README.md explicitly states it should not be shared and is machine-specific. The existing example has a .gitignore that excludes .expo/, but example-fdv2 is missing a .gitignore entirely, causing these files to be tracked.

Additional Locations (1)
Fix in Cursor Fix in Web

Reviewed by Cursor Bugbot for commit 3f9c780. Configure here.

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.

1 participant