Is there an example of how to use a crudmanager to send requests with two stores? I read the documentation https://www.bryntum.com/docs/scheduler/guide/Scheduler/data/crud_manager, but noticed that the way it is implemented in react is different. Could you please show me how to use the crudmanager in react to send and receive data.
crudManager: {
autoLoad: true,
transport: {
load: {
url: 'data/data.json'
}
},
// This config enables response validation and dumping of found errors to the browser console.
// It's meant to be used as a development stage helper only so please set it to false for production systems.
validateResponse : true
},
You can also configure sync in transport to have Scheduler send data to the server. If you do so, you will see that the sent data are from all stores.
My bad I meant that I have two schedulers. We want to keep both of them in sync. I however think that it is better now to have two separate crud managers and sync at the same time. Is this good practice?
Hi is there an example where a sync request is send in react? We are trying to make a backend but I do not fully understand where to put the autosync: true property or how to sync in general.
I am mostly a frontend developer and that is why I do no understand much about php. We have a rust backend that we want to use for these sync and load requests. I am wondering now what type of request is send because my scheduler is not sending anything.
crudManager: {
autoSync: true,
autoLoad: true,
// transport: {
// load: {
// url: 'data/data.json'
// }
// },
sync: {
url: 'customurl',
// specify Content-Type for requests
headers: {
'Content-Type': 'application/json'
},
},
// This config enables response validation and dumping of found errors to the browser console.
// It's meant to be used as a development stage helper only so please set it to false for production systems.
validateResponse: true,
},
I get an error saying that says this:
Uncaught TypeError: me.sync is not a function
at CrudManager.<anonymous> (:3000/static/js/0.chunk.js:167239:24)
at :3000/static/js/0.chunk.js:64120:22
I do not understand whats going on. Maybe it will be better just to save the events using axios?