Redux use with Event Calendar

Hi, i’ve been using mobiscroll event calendar module for a while now. its great. I was wondering if there are resources for redux integration in EventCalendar, this was basically what I tried and failed. Previously, I had just loaded the event at the component level state with useState hook, which works fine.
const [events, setEvents] = useState(initialEvents) <— this works
const { events, isLoading } = useSelector((state: RootState) => state.events) <— this does not

any ideas why?

Hello @Ridhwan_Hassan :wave:

As we discussed in the other thread:

You can’t pull from the redux store directly, but you still need to mount it in the component state.

1 Like

Hi @Zsombor I also encounter this issue when using selector on Redux Toolkit. May I ask where is the thread that you mentioned so I can also check?

Hello @JaysonD :wave:

The other thread was a private conversation however, as I mentioned here, the problem was that you can’t pull from the redux store directly, but you still need to mount it in the component state.

Yup, that’s what I’m doing here but still I have those issue about read-only properties

https://forum2.mobiscroll.com/t/react-redux-mobiscroll-timeline-issue/1380