this is my code in react.
const [value, setValue] = React.useState<CountriesEntityData | null>({
id: '',
name: '',
regions: [
{
id: '',
name: '',
districts: [
{
id: '',
name: '',
locations: [{ id: '', city: '', division: '', street: '' }],
},
],
},
],
})
I try this code in resolving this problem
value?.regions?.name
can anyone give me tutorial link in dealing in this kind of situation thank you.
value?.regions?.name?setValue(null)? If not and with using an initial value, why even allownull(CountriesEntityData | null)? It just makes things more complicated.