score:1

Accepted answer

the best way to do this is by cloning the element, you should use react.cloneelement. to make the component usable everywhere, just create a new component using it, and export it.

import react from "react";
import {link} from "react-router";

const customlinkattribute = react.cloneelement(link, {
  newprop: "new prop val here"
});
export default customlinkattribute;

score:1

you can clone the element and add the extra props using react.cloneelement e.g:

var clonedelementwithextraprops = react.cloneelement(
    mainelement, 
    { newprop: "this is a new prop" }
);

return clonedelementwithextraprops;

Related Query

More Query from same tag