Fixing deprecated issues in AppContainer

The following warnings are fixed.
 1) warning.js:44 Warning: Failed prop type: Passing "props" prop to
<AppContainer /> is deprecated. Replace <AppContainer component={App}
props={{ myProp: myValue }} /> with <AppContainer><App myProp={myValue}
/></AppContainer>.
    in AppContainer

2) Warning: Failed prop type: Passing "component" prop to <AppContainer
/> is deprecated. Replace <AppContainer component={App} /> with
<AppContainer><App /></AppContainer>.
    in AppContainer
This commit is contained in:
rajeshaz09 2016-07-07 11:26:23 +05:30
parent 6fc4dadea4
commit 1f2419ec36

View File

@ -7,20 +7,22 @@ import Root from './containers/Root';
const store = configureStore();
render(
<AppContainer
component={Root}
props={{ store }}
/>,
<AppContainer>
<Root
store={ store }
/>
</AppContainer>,
document.getElementById('root')
);
if (module.hot) {
module.hot.accept('./containers/Root', () => {
render(
<AppContainer
component={require('./containers/Root').default}
props={{ store }}
/>,
<AppContainer>
<Root
store={ store }
/>
</AppContainer>,
document.getElementById('root')
);
});