Sorry new to TypeScript and I am using React ace builds and I am getting this error:
Warning: Failed prop type: Invalid prop
value
of typearray
supplied toReactAce
, expectedstring
.
In the /node_modules/react-ace-builds
folder there is a types.d.ts
file and there is a declaration here:
export interface AceEditorProps {
/** other types **/
value?: string;
/** other types **/
}
But I am using it like in the docs:
<DiffEditor
value={["Test code differences", "Test code difference"]}
height="1000px"
width="1000px"
mode="text"
/>,
I tried this solution from this question...
type DiffEditorOverridingValueProp = Omit<DiffEditor, 'value'> & { value: any };
<DiffEditorOverridingValueProp
DiffEditorOverridingValueProp={["Test code differences", "Test code difference"]}
height="1000px"
width="1000px"
mode="text"
/>,
But that does not work! Any ideas what I am doing wrong?