Black Lives Matter. Please consider donating to Black Girls Code today.

Error while plotting: Error: DOM element provided is null or undefined

I’m using React@v16.2.0 and Typescript
The plot shows correctly so I don’t have any problem with it but that error still shows in Chrome’s console.

Here’s my code

declare var Plotly: any;
import createPlotlyComponent from "react-plotly.js/factory";
.....
public render(): JSX.Element {
    return (
        <div>
            <Plot data={[
                {
                    type: "scatter",
                    x: this.props.x,
                    y: this.props.y
                }
            ]}/>
        </div>
    );