3 ms·
Of course. Web applications are bigger and bigger, and quite often you have some hierarchical data structure in JSON (usually in form of tree, but tree is kind
by hex13 10y ago
Of course. Web applications are bigger and bigger, and quite often you have some hierarchical data structure in JSON (usually in form of tree, but tree is kind of graph anyway).
You have to deal with these kind of structures anyway. You have to be able to render such data as hierarchy of components, you have to be able to get some information from it, to transform it, to update it.
Tree traversal is almost as common in front-end world as using .map, .filter or .reduce, I think (and using `reduce` also can seem hard on beginning, but it's quite useful).