Extending dcc.Graph in React

I am trying to extend some of the components in React with some functionality. I have installed dash core components though NPM and the code builds.


import React, {Component} from 'react';
import PropTypes from 'prop-types';
import Graph from 'dash-core-components';


export default class TGraph extends Component {
    render() {
        const {id} = this.props;

            <Graph id={id}></Graph>

TGraph.defaultProps = {};

TGraph.propTypes = {
  id: PropTypes.string

This all builds but then when I want to use this in the following file:

import new_components
import dash
from dash import html

external_scripts = [
app = dash.Dash(__name__,

app.layout = html.Div(

if __name__ == "__main__":

The dash debugger gives me the following error:

Element type is invalid: expected a string (for built-in components) or a class/function (for composite components) but got: object. You likely forgot to export your component from the file it’s defined in, or you might have mixed up default and named imports.

Check the render method of i.

I have tried importing the Graph with import {Graph} from 'dash-core-components'; or with an alias as import {Graph as DCCGraph} from 'dash-core-components'; as in this question, but that didn’t help. I can’t find what it is trying to render with “i”.

Can anyone help?