{"library":"react-refractor","type":"library","category":null,"description":"react-refractor is a lightweight React component for syntax highlighting code snippets, acting as a thin wrapper around the `refractor` library. `refractor` itself is a virtual DOM implementation of `Prism.js`, allowing for efficient updates and server-side rendering without direct DOM manipulation. The current stable version is v4.0.0, which dropped Node.js 18 support and upgraded to `refractor` v5. The library maintains a moderately active release cadence, with several minor and major versions released within the last year. A key differentiator is its VDOM-based approach, which makes it performant and flexible for React environments but also means it's incompatible with `Prism.js` plugins. Developers must explicitly import and register specific language syntaxes from `refractor` to keep bundle sizes small, and styling is left to the developer, often by importing `Prism.js` themes. It requires React 18+ and is ESM-only since v3.0.0.","language":"javascript","status":"active","version":"4.0.0","tags":["javascript","react","highlight","syntax","refractor","vdom","typescript"],"install":[{"cmd":"npm install react-refractor","imports":["import { Refractor } from 'react-refractor'","import { registerLanguage } from 'react-refractor'","import js from 'refractor/lang/javascript'"]},{"cmd":"yarn add react-refractor","imports":[]},{"cmd":"pnpm add react-refractor","imports":[]}],"homepage":null,"github":"https://github.com/rexxars/react-refractor","docs":null,"changelog":null,"pypi":null,"npm":"https://www.npmjs.com/package/react-refractor","openapi_spec":null,"status_page":null,"smithery":null,"compatibility":{"summary":{"python_range":"18–22","success_rate":0,"avg_install_s":null,"avg_import_s":null,"wheel_type":null},"url":"https://checklist.day/v1/registry/react-refractor/compatibility"},"provenance":{"verified_status":null,"verified_at":null,"last_verified":"Wed Jun 17","next_check":"Sat Jul 18","install_tag":null}}