linkKeyProperty setting

Is it mandatory to set “linkKeyProperty” when used gojs-React ?

I haven’t set model (GraphLinkModel) while initiating diagram, but from “redux-store”, when nodes and links are set, error is shown in console log and only first top node shown in diagram.


      model: $(go.GraphLinksModel, {
        linkKeyProperty: 'key'

The diagram is shown as expected.

Same code without typescript code (on codepen) works without linkkeyProperty. There I set node and links collection to graphLinksModel.

Can you provide why this difference ?

If you are using a GraphLinksModel and gojs-react, then yes, setting GraphLinksModel.linkKeyProperty is required.

However you might not get an error until one wants to change the GraphLinksModel.linkDataArray. The key is used to find the correct link data object in the GoJS model.