I want to build dynamic trees in a React application and I am using the D3 library with external sources (CSV file) for that.
This CSV file updates dynamically, the problem is that this file is located inside the React source folder, so every time the file changes, the whole application reloads. I only want the tree to reload with it because I lose every other entered information upon reload.
componentWillMount() {
treeUtil.parseCSV(csvSource)
.then((data) => {
this.setState({ data });
console.log('This is the new data for the tree', data);
})
.catch((err) => console.error(err));
}
Can someone help me?