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 fca032d commit 4726409
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions apps/website/src/routes/docs/contributing/index.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -374,6 +374,14 @@ The other utility is `processChildren`, which allows us to search through the ch
The prop `_index` contains an underscore to emphasize that it is an internal prop. Notice how `_index` is consumed in the child Item component.
#### DONT USE SLOTS
Notice how `<ExampleRoot />` returns a `children` prop. This is because inline components are able to look at children. Rather than passing a slot in an inline component, the children prop should be passed to the component's return function.
#### How to use hooks and context?
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.
## 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 4726409

Please sign in to comment.