| 
									
										
										
										
											2018-08-23 16:29:26 +01:00
										 |  |  | import React from 'react'; | 
					
						
							|  |  |  | import PropTypes from 'prop-types'; | 
					
						
							|  |  |  | import { Provider } from 'react-redux'; | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | import { createStore } from './src/redux/createStore'; | 
					
						
							| 
									
										
										
										
											2018-08-30 15:27:53 +01:00
										 |  |  | import AppMountNotifier from './src/components/AppMountNotifier'; | 
					
						
							| 
									
										
										
										
											2018-08-23 16:29:26 +01:00
										 |  |  | 
 | 
					
						
							|  |  |  | const store = createStore(); | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | export const wrapRootElement = ({ element }) => { | 
					
						
							| 
									
										
										
										
											2018-08-30 15:27:53 +01:00
										 |  |  |   return ( | 
					
						
							|  |  |  |     <Provider store={store}> | 
					
						
							|  |  |  |       <AppMountNotifier render={() => element} /> | 
					
						
							|  |  |  |     </Provider> | 
					
						
							|  |  |  |   ); | 
					
						
							| 
									
										
										
										
											2018-08-23 16:29:26 +01:00
										 |  |  | }; | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | wrapRootElement.propTypes = { | 
					
						
							|  |  |  |   element: PropTypes.any | 
					
						
							|  |  |  | }; |