Possible there is a simple solution, but clearly seems I missing something. Any ideas what prop type should I use here?
state: { focusedInput: string }
constructor(props: FilterProps) {
super(props);
this.state = {
focusedInput: null
}
}

Ah, seems like using type null sort it out.
state: { focusedInput: null }
you probably want to use ?string ([maybe type]) to allow both null/undefined and string values as well.
@madbence Thanks for the suggestion!
can I have a ?string as a return type?
@sibelius sure, eg.:
function maybeString(): ?string {
return null;
}
Most helpful comment
you probably want to use
?string([maybe type]) to allow bothnull/undefinedandstringvalues as well.