Answers about react
Questions and answers from the Croct community about react.
Moving off a client-side flag tool to the Croct React SDK, how did it actually feel?
we run our experiments through a client-side flag SDK and keep fighting the flash of the wrong variant before the rules load. Every page briefly shows the…
How do I get TypeScript types for the content a slot returns in React?
I am tired of treating slot content as any in my React components. Right now I destructure useContent('home-hero') and TypeScript has no idea what the fields…
Where in my React tree should I put the CroctProvider?
just installed @croct/plug-react and I am not sure how high up the tree the provider actually needs to be. I have a few routes that read content and one that…
How do I pass my own variables into a slot with useContent in React?
the content a slot returns needs to depend on a value my component already has, like the plan tier or a category. I would rather feed that straight into the…
Strapi backend with a plain React SPA, which Croct SDK and how do I avoid the flash?
our content lives in Strapi and the storefront is a plain React app on Vite, no Next anywhere in the stack. i want to add Croct for personalization but i keep…
useContent suspends and blanks my whole page, how do I scope the Suspense boundary?
I have a single <Suspense> boundary wrapping the whole page, and every useContent call inside it suspends the entire view until all of the slots resolve. So…
useContent in our Remix + Sanity app blanks the component then swaps, expected?
We are on Remix 2.15 with @croct/plug-react 2.x, and the hero content is authored in Sanity. I wrapped our Sanity-driven hero in useContent('home-hero')…
VWO edits on our Storyblok React site keep getting wiped by re-renders
Our marketing team built a couple of tests in VWO's visual editor on our Storyblok-powered React site. The symptom is consistent: the edited headline or…
Two-person team drowning in self-hosted GrowthBook maintenance, what do React shops actually run?
CTO of a two-person startup. We self-host GrowthBook because it seemed free, and in a sense it is. The Docker stack, the warehouse plumbing, and the…
Croct React SDK throws about client logic during SSR in our custom server rendering
We have a hand-rolled Express SSR setup (fintech, so migrating frameworks is not quick) and rendering components that use Croct hooks on the server throws the…
Moving off client-side flags because of control flash in our React SPA, does a SPA even avoid this?
I do CRO at an agency. We ran an experiment for a client through PostHog feature flags in their React SPA and users visibly got the control for a beat before…
Users log into two accounts in two tabs and their sessions bleed together
B2B app, support agents routinely open two customer accounts side by side in separate tabs. Our support team can reliably reproduce cross-account…