JSFiddle - React, Tailwind, and code Playground

by brigand

JavaScript

var data = {
  "id": "6qqb3ugxm",
  "text": "Title 1",
  "replies": [{
      "id": "9ogk7lukv",
      "text": "option 1",
      "next": {
        "id": "e2v8ktymz",
        "text": "Title 2",
        "replies": [{
            "id": "oah5q9poq",
            "text": "option 4",
            "next": {
              "id": "dl6npsd47",
              "text": "Auto responded title",
              "replies": [],
              "dialogs": [{
                  "id": "viim1j6lo",
                  "text": "Test dialog",
                  "type": ""
                },
                {
                  "id": "lohao4go5",
                  "text": "Test dialog",
                  "type": ""
                },
                {
                  "id": "t4ybo9klx",
                  "text": "Test dialog",
                  "type": ""
                },
                {
                  "id": "3pdjlfkqt",
                  "text": "Test dialog",
                  "type": ""
                }
              ]
            },
            "selected": false
          },
          {
            "id": "p1crx33gv",
            "text": "option 5",
            "next": {
              "id": "do7nn51mk",
              "text": "",
              "replies": [],
              "dialogs": []
            },
            "selected": false
          },
          {
            "id": "jwpyd7oad",
            "text": "option 6",
            "next": {
              "id": "gzuatzi2n",
              "text": "Title 3",
              "replies": [{
                  "id": "wwop8rxxj",
                  "text": "",
                  "next": {
                    "id": "as5vydqa6",
                    "text": "",
                    "replies": [],
                    "dialogs": []
                  },
                  "selected": false
                },
                {
                  "id": "ut4gjar9n",
                  "text": "option 8",
                  "next": {
                    "id":...