Recent content by mathmari
-
M
If statement & PopUp window in React
Is the idea to buid the tree that we get from the API again from scratch? 🤔- mathmari
- Post #44
- Forum: Programming and Computer Science
-
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...- mathmari
- Post #43
- Forum: Programming and Computer Science
-
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? 🤔- mathmari
- Post #41
- Forum: Programming and Computer Science
-
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(() => {...- mathmari
- Post #40
- Forum: Programming and Computer Science
-
M
If statement & PopUp window in React
And using the redux store this is possible?- mathmari
- Post #39
- Forum: Programming and Computer Science
-
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?- mathmari
- Post #37
- Forum: Programming and Computer Science
-
M
If statement & PopUp window in React
I haven't understood what you mean. Could you explain that further to me?- mathmari
- Post #36
- Forum: Programming and Computer Science
-
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 ? 🤔- mathmari
- Post #34
- Forum: Programming and Computer Science
-
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? 🤔- mathmari
- Post #33
- Forum: Programming and Computer Science
-
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) => {...- mathmari
- Post #31
- Forum: Programming and Computer Science
-
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? 🤔- mathmari
- Post #29
- Forum: Programming and Computer Science
-
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} />; })}- mathmari
- Post #26
- Forum: Programming and Computer Science
-
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? 🤔- mathmari
- Post #25
- Forum: Programming and Computer Science
-
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...- mathmari
- Post #23
- Forum: Programming and Computer Science
-
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...- mathmari
- Post #22
- Forum: Programming and Computer Science