Skip to content

Expose Hooks For Custom Components #124

@codingwithmanny

Description

@codingwithmanny

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>
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions