Most chat applications need to manage state of several data components—such as messages, server responses, and cached data, (or any data on the local device that hasn't yet been sent upstream), not to mention any number of UI states—inside the app itself. As the application complexity increases, managing that state information within the appllication becomes more and more difficult.
PubNub's client state management libraries make it easier for developers to manage state of data components inside the application. The libraries listens to realtime events generated by the network, stores and manages these events on the client-side, and triggers updates to the view inside your application.
PubNub Redux Library
The PubNub Redux library provides Redux-specific functions which can be integrated with your existing or new Redux data store. The library adds structured data to the Redux store and updates the store as events are received from the PubNub Network. Your data can coexist with PubNub-defined data.
The PubNub Redux Library is in beta release with limited documentation. Detailed reference docs will be available soon.