A Rozenite plugin that lets you select React Native components in DevTools and preview them live on your simulator. Ideal for rapid UI development, component testing, and debugging complex apps.
Powered by Rozenite:
A comprehensive toolkit for creating, developing, and integrating custom plugins into React Native DevTools.
- 🔍 Instantly select and debug any registered React Native component from DevTools and view it on device/simulator
- ⚡ Rapid UI prototyping and visual debugging
- 🧩 Simple API for registering components to preview
- 🛠️ Built as a Rozenite plugin for seamless DevTools integration
bun add -D rozenite-preview@beta
# or
npm install --save-dev rozenite-preview@beta
# or
yarn add -D rozenite-preview@beta
Add the following to your babel.config.js
to get more insights and metadata in your previews:
module.exports = {
presets: ["module:metro-react-native-babel-preset"],
plugins: ["rozenite-preview/babel-plugin"]
};
- Register your components for preview:
import { registerPreview } from "rozenite-preview";
registerPreview("MyButton", MyButton);
registerPreview("UserCard", UserCard);
- Wrap your app with the preview host:
import { PreviewHost } from "rozenite-preview";
export default function App() {
return <PreviewHost>{/* your app */}</PreviewHost>;
}
- Open React Native DevTools and use the "Preview" panel
Select and interact with your registered components in real time.
rozenite-preview-demo.mov
registerPreview(name: string, component: React.ComponentType)
PreviewHost
– React component to enable previewing
- React Native 0.79+
- React 19+
- Node 18+
MIT