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.
The PubNub Redux framework make it easier for developers to manage state of data components inside the application. The framework adds structured data to the Redux store, listens to realtime events generated by the network, and stores these events on the client-side, and triggers updates to the view inside your application. These Redux-specific functions which can be integrated with your existing or new Redux data store
This reference section shows you how to set up the PubNub Redux framework for use in your application.
The PubNub Redux Framework is in beta release with limited documentation. Detailed reference docs will be available soon.
Get Code: Source
Get Code: NPM
Install Redux Framework
Install Redux into your project folder. Redux installs its own TypeScript definitions.
Install support for the Redux application framework.
Install the Redux Thunk middleware to support asynchronous requests.
To install the SDKs and required libraries, do the following:
Install the PubNub Redux Framework. This framework installs its own TypeScript definitions.