Application state management with redux and kendo jquery

0 Answers 92 Views
Data Source
Adalberto
Top achievements
Rank 1
Adalberto asked on 05 Nov 2022, 01:47 AM
Hello, I'm using Kendo Jquery to create my SPAs applications, I'm missing using a state controller, because I need some components to communicate and update according to a general action.

For example, instead of adding all listeners to the datasource's change event or the observable object,
I thought about using Redux.

Imagining the following scenario, I have a datasource that will provide a list of all system notifications. When receiving the notification from the server, this datasource will be updated, in the update we will perform specific functions according to the new notification. For example, we can display a message or open an application.

I could register all possible operations in each new notification within the "CHANGE" event of the datasource, however, with each new function to handle a new type of notification, I will have to change the "CHANGE" event of this datasource.

I'm thinking of using redux, this would be responsible for notifying any change of state for the components subscribed to the store, executing the store dispatch on the "change" trigger of the datasource or observable object, thus giving more freedom for the new components to use the event change of state without having to change the "CHANGE" trigger of the datasource.

I would like to know if this would be a good practice and if anyone has used redux with kendo jquery and what are your recommendations?

Thanks
Ianko
Telerik team
commented on 09 Nov 2022, 10:02 AM

Hi Adalberto,

What you are looking for is to couple the Redux (or any other state manager) with the DataSource utility. The Kendo jQuery components on their own do not have any facility to be bound or wired to a state management system. They are capable only to be bound using the DataSource API. That said, in order to wire up a state management like Redux you will need to either change the data of the DataSource using the data method, or implement the transport options as functions to control the wired CRUD operations.

No answers yet. Maybe you can help?

Tags
Data Source
Asked by
Adalberto
Top achievements
Rank 1
Share this question
or