Make the graph a React component.