When we initialize the tree, the keys are the one of the first level of the endpoint ? I mean the following :
Could you explain to me the function loadTree ? According to the picture I loaded above we have :
tree.server = data[0].server = 41
tree.treeId = data[0].tree_id = 19
Or not? Could...
For the beginning I tried to do that with a non elegant way, to get all data by for loops, I used 3 for loops. I am not reallt sure if I print it correctly with the <TreeView>, could you take a look at it ?
const [dataObj, setDataObj] = useState([]);
useEffect(() => {...
In React can we use a while loop?
I want to return a Tree so do I not have to check if there are other non-empty children to be printed? How is this defined in React? 🤔
I have changed this and I think the way I get the attributes is now correct :
const [parsed_tree, setParsedTree] = useState('');
useEffect(() => {
ParsedTree();
}, []);
const ParsedTree = () => {
axios...
Ah ok! To call this POST request we go click on a button and with onClick we call then the above function, right?
What happens with a GET request? Then we don't click on a button, we just want that something is shown up, right? Do we just call then the function?
Is the GET request as follows...