Skip to content

Commit

Permalink
Update index.mdx
Browse files Browse the repository at this point in the history
  • Loading branch information
thejackshelton authored Sep 5, 2024
1 parent 4726409 commit 26c1788
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions apps/website/src/routes/docs/contributing/index.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -382,6 +382,23 @@ Notice how `<ExampleRoot />` returns a `children` prop. This is because inline c
Context and hooks is still easy to use, create a new component called `<ExampleBase />` and return that instead of the div (with the children passed between) in the example above. From there, you can use context, hooks, and all the other Qwik goodies as a top level component.
```tsx
return (
<ExampleBase>
{props.children}
</ExampleBase>
)

// use hooks, context, and other stuff here!
export const ExampleBase = component$(() => {
return (
<div>
<Slot />
</div>
)
})
```
## That's it!
Hopefully you should have enough to get up and running with Qwik UI Headless, if you have any questions don't let us stop you from reaching out, and happy building :qwik:
Expand Down

0 comments on commit 26c1788

Please sign in to comment.