Geek Culture
Published in

Geek Culture

Middleware Function for Reducer in Context API

Context API WebSocket middleware for real-time state update

Photo by Ryan Song on Unsplash

In the Context API, reducer and initial state object are created to access or update the state values from the other components. Accordingly, the useReducer hook is used for both getting state values and dispatching actions to update the values of the state provider. With the help of…

--

--

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store