Solved
How to render root path in React
How to render this via Java and show in react?
<linkURL
jcr:primaryType="nt:unstructured"
sling:resourceType="granite/ui/components/coral/foundation/form/pathfield"
fieldLabel="Link"
nodeTypes="cq:Page"
name="./linkURL"
required="{Boolean}true"
rootPath="/content/demoproject"/>