Gojs objects not showing up on canvas in reactjs

Hi I’m trying to show objects of gojs on canvas, but its not coming up. Canvas comes up in the div when I inspect, but no data/elements come on ui.
Even the height of empty canvas comes as 1px, even after increasing height the canvas shows up is empty.
Please help

let $ = go.GraphObject.make; // for conciseness in defining templates

let myDiagram = $(go.Diagram, this.refs.mydiagram, // must name or refer to the DIV HTML element
{
initialContentAlignment: go.Spot.Center
});

// response is the object having my data

let myPreviewDiagram = new go.Diagram();
myDiagram.model = new go.GraphLinksModel(response.nodeDataArray, response.linkDataArray);
myPreviewDiagram.makeSVG({
size: new go.Size(100, 100)
});

this.refs.mydiagram.appendChild(kk);

The problem is that you first construct a Diagram and associate it with an HTML DIV element but with no Model.

Then you construct a second Diagram and assign it a Model but you do not associate it with any HTML DIV element.

Clearly you should only make one Diagram and associate it with an HTML DIV element and also assign it a Model.