consttags=[// if closable is rendered a 'x' on the tag, // which triggers onDelete when clicked{name: "foo",closable: true,color: "magenta"},{name: "bar",color: "cyan"},{name: "lorem",closable: true,color: "blue"}]constonAdd=(value)=>{// your codereturntrue// true if added successful. false if you wanna show an error.}constonDelete=(value)=>{// your code}<TagsViewertags={tags}onAdd={onAdd}onDelete={onDelete}errorMessage={'Tag already exists'}/>