[REACT] Immer problem (redux) with Scheduler Pro
Hi,
i have to create a new thread, sorry.
Please take your react + redux example and add this code under the transformResponse part in the data.js file.
async onCacheEntryAdded(arg, { updateCachedData, cacheDataLoaded, cacheEntryRemoved }) {
try {
// wait for the initial query to resolve before proceeding
await cacheDataLoaded;
// when data is received from the socket connection to the server,
// if it is a message and for the appropriate channel,
// update our query result with the received message
const newData = /* import here youre new dataset */
setTimeout(() => {
updateCachedData((draft) => {
return [newData];
}, 5000);
});
} catch (e) {
console.log(e);
// no-op in case `cacheEntryRemoved` resolves before `cacheDataLoaded`,
// in which case `cacheDataLoaded` will throw
}
// cacheEntryRemoved will resolve when the cache subscription is no longer active
await cacheEntryRemoved;
// perform cleanup steps once the `cacheEntryRemoved` promise resolves
},
You should get following error message: Uncaught TypeError: Cannot add property expanded, object is not extensible
Can you reproduce it?