Skip to content

Commit 4726409

Browse files
Update index.mdx
1 parent fca032d commit 4726409

File tree

1 file changed

+8
-0
lines changed
  • apps/website/src/routes/docs/contributing

1 file changed

+8
-0
lines changed

apps/website/src/routes/docs/contributing/index.mdx

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -374,6 +374,14 @@ The other utility is `processChildren`, which allows us to search through the ch
374374
375375
The prop `_index` contains an underscore to emphasize that it is an internal prop. Notice how `_index` is consumed in the child Item component.
376376
377+
#### DONT USE SLOTS
378+
379+
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.
380+
381+
#### How to use hooks and context?
382+
383+
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.
384+
377385
## That's it!
378386
379387
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:

0 commit comments

Comments
 (0)