wevm/vocs

Expose Hooks For Custom Components

Opened this issue · 0 comments

Context

Similar to vitepress, I would like the hooks, example useConfig to be expose to take advantage in custom components.

Proposal

Here's an example of what I'm proposing.

File: ./components/MyCustomHeroSection.tsx

import { useConfig } from 'vocs/hooks';

const MyCustomHeroSection = () => {
  const config = useConfig()'

  return <section>
    <h1>{config?.title ?? ''}</h1>
  </section>
}