PR-753737: Se agrega soporte para typescript.

This commit is contained in:
2022-04-22 15:00:14 +00:00
parent d6f2d2d5dd
commit df79637288
18 changed files with 714 additions and 122 deletions

26
src/frontend/setStore.js Normal file
View File

@ -0,0 +1,26 @@
// Redux
import { createStore } from 'redux'; //, applyMiddleware
// import { Provider } from 'react-redux';
import { composeWithDevTools as composeWithDevToolsWeb } from 'redux-devtools-extension';
import { config } from '../config';
import reducer from './reducers';
const { env } = config;
const composeEnhancers = composeWithDevToolsWeb({
// Specify here name, actionsBlacklist, actionsCreators and other options
});
const setStore = ({ initialState }) => {
const store = env === 'development' ? createStore(
reducer,
initialState,
composeEnhancers(),
) : createStore(
reducer,
initialState,
);
return store;
};
export default setStore;