Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
const middlewares = [
queryMiddleware
]
if (options.basename) {
middlewares.push(createBasenameMiddleware({
basename: options.basename
}))
}
return [
createHistoryEnhancer({
protocol: createHistoryProtocol(),
middlewares
}),
createMatchEnhancer(
// new Matcher(hotRouteConfig(routes))
new Matcher(routes)
)
]
}
function generateStore(protocol) {
const historyEnhancer = createHistoryEnhancer({
protocol,
middlewares: [queryMiddleware],
})
const matcherEnhancer = createMatchEnhancer(
new Matcher(routeConfig),
)
const middleWare = composeEnhancers(
historyEnhancer,
matcherEnhancer,
)
const store = createStore(reducers, middleWare)
store.dispatch(FarceActions.init())
return store
}