Commit 1eeca07
authored
refactor: make react hello example follow specs (#1233)
This PR will rewrite the `client-only` example into our official
`hello-react` example.
The `hello-react` example is much simpler than the previous
`client-only` and does only the things described in the hello example
specs.
## Caveats
I still have the `client-only` example in my local instance... I think
we can think about adding it in if there is a demand for more complex
sample applications
<!-- CURSOR_SUMMARY -->
---
> [!NOTE]
> **Low Risk**
> Low risk: changes are limited to example app code and CI workflows
that run example e2e tests; main SDK logic is untouched, but CI could
fail if the new workspace name or dependencies are misconfigured.
>
> **Overview**
> Switches React example coverage from the old
`@internal/react-sdk-example-client-only` app to a new, spec-aligned
`hello-react` example, and updates both `react.yml` and
`react-nightly.yaml` to run its Playwright e2e tests.
>
> Removes the `client-only` example from workspaces and replaces it with
`packages/sdk/react/examples/hello-react`, including new top-level
examples docs (`packages/sdk/react/examples/README.md`) and ignore
rules. The `hello-react` app is simplified (no context switching /
flag-key form) and its workspace now pins `@launchdarkly/react-sdk` to
`0.1.1` instead of using the monorepo `workspace:^` dependency.
>
> <sup>Written by [Cursor
Bugbot](https://cursor.com/dashboard?tab=bugbot) for commit
8ead7b3. This will update automatically
on new commits. Configure
[here](https://cursor.com/dashboard?tab=bugbot).</sup>
<!-- /CURSOR_SUMMARY -->
<!-- devin-review-badge-begin -->
---
<a href="https://app.devin.ai/review/launchdarkly/js-core/pull/1233"
target="_blank">
<picture>
<source media="(prefers-color-scheme: dark)"
srcset="https://static.devin.ai/assets/gh-open-in-devin-review-dark.svg?v=1">
<img
src="https://static.devin.ai/assets/gh-open-in-devin-review-light.svg?v=1"
alt="Open with Devin">
</picture>
</a>
<!-- devin-review-badge-end -->1 parent 66a2de5 commit 1eeca07
File tree
23 files changed
+105
-165
lines changed- .github/workflows
- actions/run-example
- packages/sdk/react/examples
- client-only
- src
- hello-react
- e2e
- src
23 files changed
+105
-165
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
16 | 16 | | |
17 | 17 | | |
18 | 18 | | |
19 | | - | |
| 19 | + | |
20 | 20 | | |
21 | | - | |
| 21 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
92 | 92 | | |
93 | 93 | | |
94 | 94 | | |
95 | | - | |
| 95 | + | |
96 | 96 | | |
97 | | - | |
| 97 | + | |
98 | 98 | | |
99 | 99 | | |
100 | 100 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3 | 3 | | |
4 | 4 | | |
5 | 5 | | |
6 | | - | |
| 6 | + | |
7 | 7 | | |
8 | 8 | | |
9 | 9 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
20 | 20 | | |
21 | 21 | | |
22 | 22 | | |
23 | | - | |
| 23 | + | |
24 | 24 | | |
25 | 25 | | |
26 | 26 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
This file was deleted.
This file was deleted.
File renamed without changes.
Lines changed: 1 addition & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
15 | 15 | | |
16 | 16 | | |
17 | 17 | | |
| 18 | + | |
18 | 19 | | |
19 | 20 | | |
20 | 21 | | |
| |||
0 commit comments