qwik icon indicating copy to clipboard operation
qwik copied to clipboard

docs: improved component$ overview

Open shairez opened this issue 2 years ago • 9 comments

Co-authored-by: Yoav Ganbar [email protected] Co-authored-by: Dmitry Fleish [email protected]

What is it?

  • [ ] Feature / enhancement
  • [ ] Bug
  • [x] Docs / tests

Description

We've changed the component$ overview doc to be more beginner friendly The doc now can be used as a reference to how to create simple components without all of mental model explanation that belong in more advanced docs.

We still have the following work to do:

  • [ ] Provide links to other related docs

shairez avatar Jan 18 '23 11:01 shairez

Review PR in StackBlitz Codeflow Run & review this pull request in StackBlitz Codeflow.

LOVE IT!

manucorporat avatar Jan 18 '23 13:01 manucorporat

I think we have 3 more things left to do here @shairez :

  1. Links (like you mentioned)
  2. extract important stuff from leftovers or delete them completely
  3. add caveat about destructuring props (@manucorporat if you can give one sentence about the status that would be helpful)

hamatoyogi avatar Jan 19 '23 14:01 hamatoyogi

I think the only cavenet is to avoid things like things:

export const CMP = component$({value = complexDefaultValue()}) => {

});

and avoid props destructuring in functional components like:

function Cmp({value}) {

}

^ we cant optimize this one

manucorporat avatar Jan 20 '23 10:01 manucorporat

I love it @shairez 🙏 It's very clean now!

One question regarding storing a reference: would it make sense to push that to the state section instead?

And another thing (maybe not related to this PR) is, if we want to add smth like this https://beta.reactjs.org/learn. Like a quick start for all new ppl interested in qwik to get them started. Guess this would cut the questions asked on the discord channels

zanettin avatar Jan 25 '23 20:01 zanettin

thanks @zanettin !

Good question about the Ref... I'm not sure tbh @manucorporat @hamatoyogi @fleish80 WDYT?

About the qwik-start 😉 Yes! totally

shairez avatar Feb 01 '23 10:02 shairez

@shairez the files have been moved an evolved in the past few months. should we create a new PR with the imortant and still missing parts against the new files?

zanettin avatar Sep 01 '23 21:09 zanettin

@shairez is this still good to continue?

wmertens avatar Mar 04 '24 08:03 wmertens

I think we might need to redo these as some things are outdated.

hamatoyogi avatar Mar 19 '24 15:03 hamatoyogi

closing since this is very outdated and the docs have been recently updated

PatrickJS avatar May 10 '24 20:05 PatrickJS