useVBI

Import

import { useVBI } from '@visactor/vbi-react'

Signature

useVBI(builder: VBIChartBuilder): UseVBIReturn

Description

Subscribes to DSL snapshot changes on the builder, returning the latest dsl and the original builder.

Minimal Example

import type { VBIChartBuilder } from '@visactor/vbi'
import { useVBI } from '@visactor/vbi-react'

export function Demo({ builder }: { builder: VBIChartBuilder }) {
  const result = useVBI(builder)
  return <pre>{JSON.stringify(result, null, 2)}</pre>
}