This is the model that is expecting the lessons:
export const LessonModel = types.model({
is_imported: types.boolean,
})
const CalendarStoreModel = types.model('newCalendarStore',{
lessons: types.optional(types.array(LessonModel),[]),
selectedDate: types.string
})
and here I am providing the lessons
const model = {
lessons: [
{
is_imported: false,
}
],
selectedDate: "2020-10-21"
}
Tried wrapping the lessons on LessonModel.create but it did not fix it.