Here is a very simple example.
() => { const sampleText = 'Hello world' const [annotations, setAnnotations] = React.useState([ { key: 'sample_label', name: 'Sample label', values: [{ start: 0, end: 5 }], }, ]) return ( <Annotator text={sampleText} annotations={annotations} relations={[]} onChangeAnnotations={setAnnotations} /> )}