question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Give functional components their own page in the documentation under "Components In-Depth"

See original GitHub issue

Currently, 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:open
  • Created 5 years ago
  • Reactions:6
  • Comments:10 (2 by maintainers)

github_iconTop GitHub Comments

3reactions
nabrowncommented, Aug 22, 2018

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!

3reactions
nabrowncommented, Jul 30, 2018

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:

You’ve convinced me. 🙂 As an aside, I’m also considering splitting up the render functions page into several pages, but let’s do this first. Do you want to get us started on it, or would you prefer I write the first draft? — You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or mute the thread.

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found