Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions .github/workflows/react.yml
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ jobs:
aws_assume_role: ${{ vars.AWS_ROLE_ARN }}
before_test: 'yarn workspace @launchdarkly/react-sdk-example-hello-react playwright install --with-deps chromium'

run-server-only-example:
run-react-server-example:
runs-on: ubuntu-latest
permissions:
id-token: write
Expand All @@ -109,6 +109,6 @@ jobs:
node-version: 24
- uses: ./actions/run-example
with:
workspace_name: '@launchdarkly/react-sdk-example-server-only'
workspace_name: '@launchdarkly/react-sdk-example-react-server'
aws_assume_role: ${{ vars.AWS_ROLE_ARN }}
before_test: 'yarn workspace @launchdarkly/react-sdk-example-server-only playwright install --with-deps chromium'
before_test: 'yarn workspace @launchdarkly/react-sdk-example-react-server playwright install --with-deps chromium'
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
"packages/sdk/react",
"packages/sdk/react/contract-tests",
"packages/sdk/react/examples/hello-react",
"packages/sdk/react/examples/server-only",
"packages/sdk/react/examples/react-server-example",
"packages/sdk/react-native",
"packages/sdk/react-native/example",
"packages/sdk/react-native/contract-tests/entity",
Expand Down
2 changes: 1 addition & 1 deletion packages/sdk/react/.eslintrc.cjs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
module.exports = {
ignorePatterns: ['contract-tests/next-env.d.ts', 'examples/server-only/next-env.d.ts'],
ignorePatterns: ['contract-tests/next-env.d.ts', 'examples/react-server-example/next-env.d.ts'],
overrides: [
{
files: ['contract-tests/**/*.ts', 'contract-tests/**/*.tsx'],
Expand Down
2 changes: 1 addition & 1 deletion packages/sdk/react/examples/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,4 @@ This directory contains example applications demonstrating the LaunchDarkly Reac
| Example | Description |
|---------|-------------|
| [hello-react](./hello-react/) | Minimal Vite + React app that evaluates a boolean feature flag and displays the result with real-time updates. This is the recommended starting point. |
| [server-only](./server-only/) | Next.js App Router example demonstrating server-side flag evaluation with React Server Components. |
| [react-server-example](./react-server-example/) | Next.js App Router example demonstrating server-side flag evaluation with React Server Components. |
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"name": "@launchdarkly/react-sdk-example-server-only",
"name": "@launchdarkly/react-sdk-example-react-server",
"private": true,
"scripts": {
"dev": "next dev",
Expand Down
2 changes: 2 additions & 0 deletions packages/sdk/react/src/server/LDIsomorphicProvider.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,8 @@ export interface LDIsomorphicProviderProps {
* @remarks
* **NOTE:** This component is designed to be used in conjunction with {@link LDIsomorphicClientProvider}
* in a server component to compute the bootstrap data and render this provider automatically.
*
* See the `react-server-example` example for how to use this component.
*/
export async function LDIsomorphicProvider({
session,
Expand Down
4 changes: 2 additions & 2 deletions release-please-config.json
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@
"src/platform/NodeInfo.ts",
{
"type": "json",
"path": "/packages/sdk/react/examples/server-only/package.json",
"path": "/packages/sdk/react/examples/react-server-example/package.json",
"jsonpath": "$.dependencies['@launchdarkly/node-server-sdk']"
}
]
Expand Down Expand Up @@ -119,7 +119,7 @@
},
{
"type": "json",
"path": "examples/server-only/package.json",
"path": "examples/react-server-example/package.json",
"jsonpath": "$.dependencies['@launchdarkly/react-sdk']"
}
]
Expand Down
Loading