To use redux, we must first import it const redux = require('redux'); In redux we have a central store to store data const data = { counter: 0 } const store = redux.createStore(data); We also need a reducer to update data to central store const reducer = (state = data, action) { // Some action here } We subscribe to the instance of store wherever we need access to global store store.subscribe((e) => { // some action here }); We dispatch actions which goes by reducer to the store store.dispatch({ key: value });