HA

Hast Util To Jsx Runtime

hast-util-to-jsx-runtime

hast utility to transform to preact, react, solid, svelte, vue, etc

Utilities
hast-util
hast
html
preact
react
solid
svelte
unist
utility
util
Stars
1
Weekly
0
Open issues
0
Bundle
~60 kB

Installation

npm install hast-util-to-jsx-runtime

Code example

import { useHastUtilToJsxRuntime } from "hast-util-to-jsx-runtime";

export function Example() {
  const value = useHastUtilToJsxRuntime();
  return <p>{String(value)}</p>;
}

Pros & cons

Pros

  • Actively maintained by Titus Wormer
  • 0 weekly downloads. Battle tested
  • First-class TypeScript definitions
  • MIT licensed

Considerations

  • Adds roughly ~60 kB to your bundle
  • Needs client-only rendering in SSR frameworks
  • Not supported in React Native
  • 0 open issues on GitHub

FAQs

Alternatives & similar libraries