0.0.2 • Published 4 months ago

r2vnode v0.0.2

Weekly downloads
-
License
-
Repository
github
Last release
4 months ago

r2vnode

Transforms Vue VNode to simple React VNode. This gives us ability to generate svg's with satori with vue components/jsx.

Usage

  1. Install

    yarn add r2vnode
  2. Write jsx and transform with vue function

    import satroi from 'satori'
    import { vue } from 'r2vnode'
    
    const message = 'Hello from Vue!'
    
    const svg = await satori(
        vue(
            <section>
                <h1>{message}</h1>
    
                <p>something like this !</p>
            </section>
        ),
        satoriOptions
    )