Skip to content

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

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

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.


Note

Low Risk
Low risk: changes are isolated to a new example workspace and docs, with no impact on production SDK code paths. The main risk is optional local/test tooling drift (Next/Playwright config) since it is not wired into CI here.

Overview
Adds a new packages/sdk/react/examples/vercel-edge Next.js App Router example that evaluates LaunchDarkly flags at the edge via @launchdarkly/vercel-server-sdk + Vercel Edge Config, and demonstrates server-to-client bootstrap using createLDServerSession/useLDServerSession and LDIsomorphicProvider.

Updates the React examples index README and the root package.json workspaces list to include the new example, and includes a minimal Playwright e2e smoke test plus standard Next.js/TS config and styling for the sample app.

Written by Cursor Bugbot for commit 58f5bd7. This will update automatically on new commits. Configure here.

@joker23 joker23 changed the title skz/sdk 1958/react vercel example chore(react-sdk): adding vercel edge example Apr 3, 2026
joker23 added 6 commits April 3, 2026 11:23
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 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: 179331 bytes
Compressed size limit: 200000
Uncompressed size: 829227 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: 31556 bytes
Compressed size limit: 34000
Uncompressed size: 112044 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: 37015 bytes
Compressed size limit: 38000
Uncompressed size: 202741 bytes

@joker23 joker23 force-pushed the skz/sdk-1958/react-vercel-example branch 2 times, most recently from c7df1c3 to be9d2b4 Compare April 3, 2026 16:58
@joker23 joker23 force-pushed the skz/sdk-1958/react-vercel-example branch 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

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