{"id":19092,"library":"babel-plugin-jsx-wrap-if","title":"babel-plugin-jsx-wrap-if","description":"Babel plugin for React that conditionally wraps JSX elements based on a prop. Version 0.1.1, no active maintenance. When the `wrap-if` prop is truthy, the element wraps its children; when falsy, the children are rendered without the wrapper. Simple alternative to inline ternaries or helper components. No updates since 2019, likely abandoned. Only 1 GitHub star. Use for legacy projects or simple conditional wrapping without extra components.","status":"abandoned","version":"0.1.1","language":"javascript","source_language":"en","source_url":"https://github.com/nescalante/babel-plugin-jsx-wrap-if","tags":["javascript","babel","plugin","wrap","conditional","wrap-if"],"install":[{"cmd":"npm install babel-plugin-jsx-wrap-if","lang":"bash","label":"npm"},{"cmd":"yarn add babel-plugin-jsx-wrap-if","lang":"bash","label":"yarn"},{"cmd":"pnpm add babel-plugin-jsx-wrap-if","lang":"bash","label":"pnpm"}],"dependencies":[],"imports":[{"note":"Used as a Babel plugin string in config, not imported directly in source code.","wrong":"import plugin from 'babel-plugin-jsx-wrap-if'","symbol":"default","correct":"module.exports = { plugins: ['jsx-wrap-if'] }"}],"quickstart":{"code":"// babel.config.js\nmodule.exports = {\n  plugins: ['jsx-wrap-if']\n};\n\n// React component\nfunction ConditionalBlock({ condition, children }) {\n  return (\n    <blockquote wrap-if={condition}>\n      {children}\n    </blockquote>\n  );\n}","lang":"javascript","description":"Shows how to configure the Babel plugin and use the wrap-if prop in JSX for conditional rendering."},"warnings":[{"fix":"Consider using inline ternary or a conditional wrapper component instead.","message":"Package is unmaintained since 2019.","severity":"deprecated","affected_versions":"All"}],"env_vars":null,"last_verified":"2026-04-25T00:00:00.000Z","next_check":"2026-07-24T00:00:00.000Z","problems":[{"fix":"Run 'npm install babel-plugin-jsx-wrap-if --save-dev' and verify plugin string is 'jsx-wrap-if'.","cause":"Missing npm install or typo in plugin name.","error":"Error: Cannot find module 'babel-plugin-jsx-wrap-if'"}],"ecosystem":"npm","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}