Skip to content

chore(react-sdk): adding vercel edge example#1241

Open
joker23 wants to merge 7 commits intomainfrom
skz/sdk-1958/react-vercel-example
Open

chore(react-sdk): adding vercel edge example#1241
joker23 wants to merge 7 commits intomainfrom
skz/sdk-1958/react-vercel-example

Conversation

@joker23
Copy link
Copy Markdown
Contributor

@joker23 joker23 commented Apr 3, 2026

This PR will add a vercel edge example showcasing that our Next.js integration is compatible with the edge sdk (in fact it is almost identical to the nodejs version)

Caveat

I did not implement CI for this just yet. Still pending further discussions to properly set things up.

Alternative

This example might be able to replace the complete example we made for vercel sdk.


Note

Low Risk
Mostly adds a new example app and wiring in workspace/release config; low blast radius outside docs/tooling. Risk is limited to potential dependency/version drift in the new example and release-please extra-files tracking.

Overview
Adds a new packages/sdk/react/examples/vercel-edge Next.js App Router example demonstrating flag evaluation via @launchdarkly/vercel-server-sdk + Vercel Edge Config, with server-side createLDServerSession/useLDServerSession and client bootstrap through LDIsomorphicProvider.

Updates the monorepo to include the example in Yarn workspaces, documents it in the React examples README, adds a basic Playwright e2e check, and extends release-please-config.json to keep the example’s @launchdarkly/react-sdk and @launchdarkly/vercel-server-sdk dependency pins in sync.

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


Open with Devin

@joker23 joker23 changed the title skz/sdk 1958/react vercel example chore(react-sdk): adding vercel edge example Apr 3, 2026
@joker23 joker23 force-pushed the skz/sdk-1958/react-vercel-example branch from c38c86a to f1c1dc9 Compare April 3, 2026 16:25
@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Apr 3, 2026

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

@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Apr 3, 2026

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

@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Apr 3, 2026

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

@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Apr 3, 2026

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

@joker23 joker23 force-pushed the skz/sdk-1958/react-vercel-example branch 3 times, most recently from be9d2b4 to 58f5bd7 Compare April 3, 2026 19:44
@joker23
Copy link
Copy Markdown
Contributor Author

joker23 commented Apr 3, 2026

@cursor review

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.

✅ Bugbot reviewed your changes and found no new issues!

Comment @cursor review or bugbot run to trigger another review on this PR

@joker23 joker23 marked this pull request as ready for review April 6, 2026 17:31
@joker23 joker23 requested a review from a team as a code owner April 6, 2026 17:31
Copy link
Copy Markdown
Contributor

@devin-ai-integration devin-ai-integration bot left a comment

Choose a reason for hiding this comment

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

✅ Devin Review: No Issues Found

Devin Review analyzed this PR and found no potential bugs to report.

View in Devin Review to see 2 additional findings.

Open in Devin Review

@joker23 joker23 force-pushed the skz/sdk-1958/react-vercel-example branch from 58f5bd7 to 7379c64 Compare April 6, 2026 20:49
joker23 added 6 commits April 8, 2026 10:34
This commit will also:
- modify the server-only example to demonstrate how to use the isomorphic provider
- modify the bundling so client and server can still bundle correcly with isomorphic components
- refactor the client side NOOP client to be able to execute well during SSR
@joker23 joker23 force-pushed the skz/sdk-1958/react-vercel-example branch from 7379c64 to b0675b4 Compare April 8, 2026 15:34
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 1 potential issue.

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 b0675b4. Configure here.

},
"dependencies": {
"@launchdarkly/react-sdk": "0.1.1",
"@launchdarkly/vercel-server-sdk": "workspace:^",
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Inconsistent dependency version strategy in package.json

Low Severity

The @launchdarkly/react-sdk dependency uses a pinned version "0.1.1" while @launchdarkly/vercel-server-sdk uses "workspace:^" in the same file. Both are workspace packages in this monorepo. When the react-sdk version bumps beyond 0.1.1, the pinned reference will fail to resolve to the local workspace package, potentially causing build failures or accidentally pulling a stale version from npm. Using workspace:^ for both workspace dependencies would keep them consistent and resilient to version changes.

Fix in Cursor Fix in Web

Reviewed by Cursor Bugbot for commit b0675b4. Configure here.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I agree we should be consistent, but also that we should use the opposite of the strategy recommended here.

@joker23 joker23 force-pushed the skz/sdk-1958/react-vercel-example branch from b0675b4 to 26b0092 Compare April 8, 2026 17:19
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