Error: Argument of type 'Results<Courses[] & Object>' is not assignable to parameter of type 'SetStateAction<Courses[]>'.Type 'Results<Courses[] & Object>' does not have the following properties of type 'Courses[]': pop, push, reverse, shift, and more 6.ts(2345)
// my interfaceinterface Courses { id: string; name: string; image: string;}const [courses, setCourses] = useState<Courses[]>([]);useEffect(() => { async function getOfflineCourses() { const realmDB = await realm; realmDB.write(() => { const offlineCourses = realmDB.objects<Courses[]>('Course'); setCourses(offlineCourses); }); } getOfflineCourses(); }, [realm]);