Nyior Clement
Jul 14, 2022 ⋅ 6 min read

Vue recursive components: Rendering nested comments

Nyior Clement I'm an all around software engineer who codes, writes, and sometimes designs. If you want to talk Python, I'm your guy. I own this poky corner of the interwebs xD.

Recent posts:

Using ElectricSQL to build a local-first application

ElectricSQL is a cool piece of software with immense potential. It gives developers the ability to build a true local-first application.

Rahul Padalkar
Dec 1, 2023 ⋅ 11 min read
Using Rust And Leptos To Build Beautiful Declarative User Interfaces

Using Rust and Leptos to build beautiful, declarative UIs

Leptos is an amazing Rust web frontend framework that makes it easier to build scalable, performant apps with beautiful, declarative UIs.

Eze Sunday
Nov 30, 2023 ⋅ 10 min read
5 Best JavaScript Multi-Dimensional Array Libraries

5 best JavaScript multidimensional array libraries

Learn more about the 5 best JavaScript libraries for dealing with multidimensional arrays, such as ndarray, math.js, and NumJs.

Pascal Akunne
Nov 30, 2023 ⋅ 4 min read
Dom Scandinaro Leader Spotlight

Leader Spotlight: Leading by experience with Dom Scandinaro

We spoke with Dom about his approach to balancing innovation with handling tech debt and to learn how he stays current with technology.

Jessica Srinivas
Nov 30, 2023 ⋅ 6 min read
View all posts

One Reply to "Vue recursive components: Rendering nested comments"

  1. @Nyior Clement, great article: Vue recursive components: Rendering nested comments
    I have a question in regard of that. In my case, I am creating a component to render categories and subcategories. The recursive component fits very well, so, in our case, we can have multiple levels but do not want to render them in a tree-like structure. The goal is, that when the user clicks the top-level category, second-level category children will be open, and when the user clicks one of the second-level category items (row), the third row with a third-level category children will show up, and so on. Do you have a better approach to solving this challenge using native VueJs? maybe using render function inside the component? I am using vuejs 2.7 and found portal-vue to render the items in a different DOM outside the component, but it isn’t good enough. Maybe teleport for vuejs3 could work.
    Thanks in advance,

Leave a Reply