score:2

Accepted answer
React.useEffect(() => {
        setUsersData(result => [...result, ...data])
        props.setLoading(false);
}, []);

score:3

type Item = {
    key: string,
    name: string,
    date: string,
    address: string,
}

// It will work even without specifying type here 
const data: Item[] = {
  //
}

const [usersData, setUsersData] = React.useState<Item[]>([]);

Related Query

More Query from same tag