Written version of this tutorial - https://posthog.com/tutorials/bootstrap-feature-flags-react
Subscribe for more - https://www.youtube.com/@PostHog?sub_confirmation=1
Get signup for PostHog for free - https://app.posthog.com/signup
More tutorials - https://posthog.com/tutorials
Our Slack support community - https://posthog.com/slack
In this tutorial, we build an server-side rendered React app using Express that bootstraps feature flags from the server to the client for use on initial load on the client side.
Follow us on Twitter - https://twitter.com/posthog
0:00 Intro
0:28 Create React app and setup PostHog
1:41 Feature flags
3:45 Server-side React app setup
5:13 Creating Express app
11:41 Server-side PostHog setup
13:17 User distinct ID with cookies
15:44 Passing server-side feature flags to client
18:20 Bootstrapping flags on client-side
19:39 Final tests
20:48 Outro