A lot of my day as a React developer was: build a component, open the app, click through to the screen where it shows up, check it, change something, repeat. Checking an error state or a long message meant recreating that state by hand every time.
So I built Vitrine , a Vite plugin. You put a comment above an exported component:
/** @preview */ export const PrimaryButton = () => Save ;
and open `/__vitrine` on the Vite dev server you already run. Setup is one line next to your React plugin:
plugins: [react(), vitrine()]
The idea came from Jetpack Compose's `@Preview`: write only the cases you care about, right next to the code. Since previews go through your own dev server, aliases, CSS, plugins and HMR work exactly like in your app.…