17 lines
334 B
JavaScript
17 lines
334 B
JavaScript
import React from 'react';
|
|
import { Provider } from 'react-redux';
|
|
|
|
import { createStore } from './src/redux/store';
|
|
|
|
export const wrapRootElement = ({ element }) => {
|
|
const store = createStore();
|
|
|
|
const ConnectedRootElement = (
|
|
<Provider store={store}>
|
|
{element}
|
|
</Provider>
|
|
);
|
|
|
|
return ConnectedRootElement;
|
|
};
|