static getDerivedStateFromProps(nextProps) {
    // TODO: generate new data state only data is change
    const graph = JSONLoader({
      json: nextProps.data,
      nodeParser: Identity,
      edgeParser: Identity,
    });
    return {
      graph,
    };
  }
callback when an edge is clicked