JSFiddle - React, Tailwind, and code Playground

HTML

<div data-ng-app>
    
    <script type="text/ng-template" id="common_template">
        <ul>
            <li data-ng-repeat="node in nodes">
                <h6>{{node.title}}</h6>
                <div data-ng-show="node.nodes" data-ng-include="'common_template'" data-ng-init="nodes = node.nodes"></div><!-- The best here is to use data-ui-if insted of data-ng-show but it require angular-ui-->
            </li>
        </ul>
    </script>
    
    <div data-ng-controller="myCtrl" data-ng-include="'common_template'" data-ng-init="nodes = data"></div>
    
</div>

JavaScript

function myCtrl($scope)
{
    $scope.data = [
        {
            title: "N°1 - first level",
            nodes: [
                {
                    title: "N°1 - second level",
                },
                {
                    title: "N°2 - second level",
                    nodes: [
                        {
                            title: "N°1 - third level",
                        },
                        {
                            title: "N°2 - third level",
                        },
                    ],
                },
            ],
         },
         {
            title: "N°2 - first level",
         },
    ];
}