Make custom link

I am trying to create custom port using this link in reatc js.

I am not getting where to place this function. If you have any example this in reactjs. Please let me know. I am stuck here for multiple days and didn’t get any solution.

const CustomLink = () => {;
go.Diagram.inherit(CustomLink, go.Link);

If you want to define a class in JavaScript that works even in old browsers, you cannot use arrow functions.

If you want to use the newer (but already plenty old) class syntax, do something like what you see in That’s actually compiled from TypeScript,, but you don’t have to use TypeScript if you don’t want to.