You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on May 3, 2018. It is now read-only.
I have the following scenario. I have a list of categories. Whenever I click one, I make an ajax request to get its subcategories. After that, I should render another list with the subcategories, which then, of course, can have subcategories.
This could led up to something like this:
Electronics -> Computers -> Notebooks -> HP -> Accessories.
The only way I can imagine of doing this, is creating a component for the list of items, and creating a new instance whenever I click one category and have subcategories.
Is there any other way of doing it? if not, how could I create a new instance of a component everytime after I make a request?
Thanks!
The text was updated successfully, but these errors were encountered:
Well use render function and recursion. basically you have component that renders list which list items can be clicked. so render recursively the same component which component structure is based on nested object.
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Hi,
I have the following scenario. I have a list of categories. Whenever I click one, I make an ajax request to get its subcategories. After that, I should render another list with the subcategories, which then, of course, can have subcategories.
This could led up to something like this:
Electronics -> Computers -> Notebooks -> HP -> Accessories.
The only way I can imagine of doing this, is creating a component for the list of items, and creating a new instance whenever I click one category and have subcategories.
Is there any other way of doing it? if not, how could I create a new instance of a component everytime after I make a request?
Thanks!
The text was updated successfully, but these errors were encountered: