mirror of
https://github.com/reduxjs/redux-devtools.git
synced 2024-11-11 20:27:07 +03:00
29 lines
651 B
TypeScript
29 lines
651 B
TypeScript
import { hot } from 'react-hot-loader/root';
|
|
import React from 'react';
|
|
import PropTypes from 'prop-types';
|
|
import { Provider } from 'react-redux';
|
|
import { Store } from 'redux';
|
|
import TodoApp from './TodoApp';
|
|
import DevTools from './DevTools';
|
|
import { TodoState } from '../reducers';
|
|
import { TodoAction } from '../actions/TodoActions';
|
|
|
|
interface Props {
|
|
store: Store<TodoState, TodoAction>;
|
|
}
|
|
|
|
const Root: React.FunctionComponent<Props> = ({ store }) => (
|
|
<Provider store={store}>
|
|
<div>
|
|
<TodoApp />
|
|
<DevTools />
|
|
</div>
|
|
</Provider>
|
|
);
|
|
|
|
Root.propTypes = {
|
|
store: PropTypes.any.isRequired,
|
|
};
|
|
|
|
export default hot(Root);
|