Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
import '@babel/polyfill';
import { UserListRpc, UserListHook } from './views/user-list';
import { TodoListRpc, TodoListHook } from './views/todo-list';
/**
* Add simple logger middleware
*/
const mw: Middleware = storeState => next => arg => {
/* eslint-disable no-console */
console.log(storeState.key, 'changing', arg);
const result = next(arg);
console.log(storeState.key, 'changed');
return result;
};
defaults.middlewares.add(mw);
/**
* Enable Redux devtools support
*/
defaults.devtools = true;
/**
* Main App
*/
class App extends Component<{}> {
render() {
return (
<div>
<h1>User Todos example</h1>
<main>
<div>
<h3>With Render-props</h3></div></main></div>