{"library":"vite-plugin-react-control-statements","type":"library","category":null,"description":"A Vite plugin (v1.0.2) that transforms `<If>`, `<Choose>`, `<When>`, and `<Otherwise>` JSX components into native JavaScript ternary/conditional expressions at build time, avoiding runtime overhead. Inspired by jsx-control-statements and Svelte logic blocks. Provides type definitions via `vite-plugin-react-control-statements` and optional global types via `@types/vite-plugin-react-control-statements`. Uses regex-based transformation, which is imperfect for complex nested cases. Compatible with React, Vue, and any JSX/TSX setup in Vite. Active development with no recent updates; known issues with regex parsing.","language":"javascript","status":"active","version":"1.0.2","tags":["javascript","react","control-statements","logic-blocks","typescript","jsx","tsx","if","loop"],"last_verified":"Thu Jun 04","install":[{"cmd":"npm install vite-plugin-react-control-statements","imports":["import { If } from 'vite-plugin-react-control-statements'","import { Choose, When, Otherwise } from 'vite-plugin-react-control-statements'","import reactControlStatements from 'vite-plugin-react-control-statements'"]},{"cmd":"yarn add vite-plugin-react-control-statements","imports":[]},{"cmd":"pnpm add vite-plugin-react-control-statements","imports":[]}],"homepage":"https://github.com/kirankunigiri/vite-plugin-react-control-statements#readme","github":"https://github.com/kirankunigiri/vite-plugin-react-control-statements","docs":null,"changelog":null,"pypi":null,"npm":"vite-plugin-react-control-statements","openapi_spec":null,"status_page":null,"smithery":null,"compatibility":null}