In my react and typescript app, I use: onChange={(e) => data.motto = (e.target as any).value}.
onChange={(e) => data.motto = (e.target as any).value}
How do I correctly define the typings for the class, s
This is when you're working with a FileList Object:
FileList
onChange={(event: React.ChangeEvent): void => { const fileListObj: FileList | null = event.target.files; if (Object.keys(fileListObj as Object).length > 3) { alert('Only three images pleaseeeee :)'); } else { // Do something } return; }}