import { useCompiledCode } from 'hooks'
Uses SWC to compile a string of TypeScript code at runtime.
import { CompiledComponent } from 'components' import { useCompiledCode } from 'hooks' export default function Example() { const compiledCodeString = useCompiledCode('export default () => <div>Hello World</div>') return <CompiledComponent codeString={compiledCodeString} /> }