Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
export default function(location, data) {
const sheet = new ServerStyleSheet();
const memoryHistory = createMemoryHistory(location);
const store = configureStore(memoryHistory, data);
const history = syncHistoryWithStore(memoryHistory, store);
return new Promise((resolve, reject) => {
match(
{
history,
routes: routes(store),
location
},
(error, redirect, props) => {
if (error) {
return reject(error);
}
const context = sheet.collectStyles(