Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Expose Hooks For Custom Components #124

Open
codingwithmanny opened this issue Mar 2, 2024 · 0 comments · May be fixed by #125
Open

Expose Hooks For Custom Components #124

codingwithmanny opened this issue Mar 2, 2024 · 0 comments · May be fixed by #125

Comments

@codingwithmanny
Copy link
Sponsor Contributor

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>
}
codingwithmanny added a commit to codingwithmanny/wevm--vocs that referenced this issue Mar 2, 2024
Initial useConfig exposed with example application in
playgrounds/custom-layout

BREAKING CHANGE: No

Closes: wevm#124
@codingwithmanny codingwithmanny linked a pull request Mar 2, 2024 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant