Recent content by mathmari

  1. M

    If statement & PopUp window in React

    Is the idea to buid the tree that we get from the API again from scratch? 🤔
  2. M

    If statement & PopUp window in React

    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...
  3. M

    If statement & PopUp window in React

    Or isn't it possible to use a for-loop inside the TreeView? Do we maybe have to use an extra function for that? 🤔
  4. M

    If statement & PopUp window in React

    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(() => {...
  5. M

    If statement & PopUp window in React

    And using the redux store this is possible?
  6. M

    If statement & PopUp window in React

    Do you mean how to store the tree in a redux tree or what do you mean by the above?
  7. M

    If statement & PopUp window in React

    I haven't understood what you mean. Could you explain that further to me?
  8. M

    If statement & PopUp window in React

    So we save teh whole tree in a Redux store and then we we get the component that we want to print with useSelector ? 🤔
  9. M

    If statement & PopUp window in React

    Could you explain that further to me? Do we have to store the data instead of dataObj in a Redux store? 🤔
  10. M

    If statement & PopUp window in React

    I had tried the following : const [dataObj, setDataObj] = useState([]); useEffect(() => { fetch('https://giant-db-connection.onrender.com/opc_ua_tree/') .then((res) => res.json()) .then((data) => {...
  11. M

    If statement & PopUp window in React

    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? 🤔
  12. M

    If statement & PopUp window in React

    When the above code is correct do we use .map to display the data? {setParsedTree .map((x) => { <TreeItem nodeId="{x}" label={x} />; })}
  13. M

    If statement & PopUp window in React

    So is the way I do the get request completely wrong? Or just how I want to display it? 🤔
  14. M

    If statement & PopUp window 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...
  15. M

    If statement & PopUp window in React

    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...
Back
Top