Skip to content

Conversation

ldhenry
Copy link
Contributor

@ldhenry ldhenry commented Jun 2, 2023

This PR adds a new Vercel example that showcases the following:

  1. Bootstrapping feature flags from the edge runtime and consuming them in the LaunchDarkly Client-side SDK for React. This is leveraging feature flags in edge-rendered pages while still maintaining the events and ergonomics provided by the React SDK. You can see details in app/layout.tsx and components/launchdarklyProvider.tsx.
  2. Evaluating feature flags in the Edge Middleware. This can be seen in middleware.ts.

I'm open to suggestions on new names for the examples.

@shortcut-integration
Copy link

This pull request has been linked to Shortcut Story #204542: Update documentation based on Vercel's feedback.

Base automatically changed from hbarrow/sc-204542/update-vercel-example to main June 2, 2023 13:58
@ldhenry ldhenry changed the title clenaup: move vercel into examples dir feat: add new Vercel example Jun 2, 2023
@ldhenry ldhenry marked this pull request as ready for review June 2, 2023 14:39
},
plugins: ['@typescript-eslint', 'prettier'],
ignorePatterns: ['**/dist/**'],
ignorePatterns: ['**/dist/**', '**/vercel/examples/**'],
Copy link
Contributor Author

Choose a reason for hiding this comment

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

I couldn't figure out how to get eslint to play nicely with the eslintrc file in the complete example so I decided to just ignore it here.

@ldhenry ldhenry requested review from monsagri and dariushar June 2, 2023 14:40
Copy link
Contributor

@monsagri monsagri left a comment

Choose a reason for hiding this comment

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

This is great! It really shows off some cool use-cases and looks super easy to set up.

I think the names are fine, have a couple of minor copy things again, but really just excited about it.

@ldhenry ldhenry merged commit d25f327 into main Jun 2, 2023
@ldhenry ldhenry deleted the hbarrow/sc-204542/add-new-vercel-example branch June 2, 2023 14:57
@github-actions github-actions bot mentioned this pull request Jun 2, 2023
ldhenry added a commit that referenced this pull request Jun 2, 2023
🤖 I have created a release *beep* *boop*
---


<details><summary>vercel-server-sdk: 0.4.0</summary>

##
[0.4.0](vercel-server-sdk-v0.3.0...vercel-server-sdk-v0.4.0)
(2023-06-02)


### Features

* add new Vercel example
([#130](#130))
([d25f327](d25f327))
* update Vercel example
([#129](#129))
([2296c4f](2296c4f))
</details>

---
This PR was generated with [Release
Please](https://github.com/googleapis/release-please). See
[documentation](https://github.com/googleapis/release-please#release-please).

---------

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: Henry Barrow <hbarrow@launchdarkly.com>
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.

3 participants