Give functional components their own page in the documentation under "Components In-Depth"
See original GitHub issueCurrently, all of the information for Vue functional components lives on the “Render Functions & JSX” page. I think they deserve their own dedicated page in the docs for 3 reasons:
- It is not required to build functional components with render functions. You can use template-based single file components with the
functional
keyword. I think this approach in particular deserves more attention and examples in the docs. - If I understand correctly, using functional components (especially for small, frequently-repeated components) can improve app performance because Vue doesn’t track their state or maintain instances of them. Therefore, it should be learned along with rest of the component information.
- The other usages of functional components – delegating to other components for example – could also use more explanation or examples. While this is the more advanced/rarer case, providing an example or two might help people see where they can use such a pattern in their own code.
Issue Analytics
- State:
- Created 5 years ago
- Reactions:6
- Comments:10 (2 by maintainers)
Top Results From Across the Web
React Functional Components: In-Depth Guide - KnowledgeHut
The react functional components are the core building blocks of any react ... In React, each component has its own markup and methods....
Read more >Components and Props - React
Components let you split the UI into independent, reusable pieces, and think about each piece in isolation. This page provides an introduction to...
Read more >React Function Components
This in-depth guide shows you everything about React Function Components -- which are basically just JavaScript Functions being React ...
Read more >React Functional Components, Props, and JSX - freeCodeCamp
What is a Component? ... Rather than building the whole UI under one single file, we can and we should divide all the...
Read more >Introduction to components and templates - Angular
The module-relative address of this component's HTML template. Alternatively, you can provide the HTML template inline, as the value of the template property....
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Hi @chrisvfritz I’m sure you’re busy, just wanted to let you know I did a PR for this issue – the functional components documentation changes. If there’s anyone else I can/should pull in to review, let me know. (This would be my first contrib so not sure how process works). Hope you’re enjoying summer!
Excellent. I’d love to take a first stab at it. On Jul 30, 2018, 7:12 AM -0400, Chris Fritz notifications@github.com, wrote: