From 77404d0be6f2d44f08707f9ecdf8948cd6c96eb2 Mon Sep 17 00:00:00 2001 From: Sander Hautvast Date: Wed, 18 Jul 2018 16:13:42 +0200 Subject: [PATCH] react for dummies.. --- ui/src/Tree.js | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/ui/src/Tree.js b/ui/src/Tree.js index 12a418f..b3dd3d5 100644 --- a/ui/src/Tree.js +++ b/ui/src/Tree.js @@ -10,11 +10,12 @@ class Tree extends Component { } loadData() { + console.log(this); axios.get("http://localhost:2048/callstack") .then(response => this.setState({ data: response.data })); } - clear() { + clearData() { axios.get("http://localhost:2048/clear") .then(response => this.setState({ data: response.data })); } @@ -36,8 +37,8 @@ class Tree extends Component { render() { return (
- - + +

Callstack view

{this.renderChildren(this.state.data)}