docs: improved component$ overview
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
Run & review this pull request in StackBlitz Codeflow.
LOVE IT!
I think we have 3 more things left to do here @shairez :
- Links (like you mentioned)
- extract important stuff from leftovers or delete them completely
- add caveat about destructuring props (@manucorporat if you can give one sentence about the status that would be helpful)
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
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
thanks @zanettin !
Good question about the Ref... I'm not sure tbh @manucorporat @hamatoyogi @fleish80 WDYT?
About the qwik-start 😉 Yes! totally
@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?
@shairez is this still good to continue?
I think we might need to redo these as some things are outdated.
closing since this is very outdated and the docs have been recently updated