%PDF- %GIF98; %PNG;
Server : ApacheSystem : Linux host.digitalbabaji.in 4.18.0-513.11.1.el8_9.x86_64 #1 SMP Wed Jan 17 02:00:40 EST 2024 x86_64 User : addictionfreeind ( 1003) PHP Version : 7.2.34 Disable Function : exec,passthru,shell_exec,system Directory : /home/addictionfreeind/www/vendor/cakedc/mixer/src/React/ |
Upload File : |
import createHistory from 'history/createBrowserHistory'
import { createStore, applyMiddleware } from 'redux'
import { routerMiddleware } from 'react-router-redux'
import thunkMiddleware from 'redux-thunk'
import rootReducer from './reducer'
// Create a history of your choosing (we're using a browser history in this case)
const history = createHistory({ basename: document.getElementsByTagName('base')[0].getAttribute('href') })
// Build the middleware for intercepting and dispatching navigation actions
const middleware = routerMiddleware(history)
// Add the reducer to your store on the `router` key
// Also apply our middleware for navigating
const store = createStore(
rootReducer,
applyMiddleware(
thunkMiddleware,
middleware
)
)
export { store, history }