Skip to content

Commit 4c9dc62

Browse files
committed
Export dispatcher factory instead
1 parent 66e3097 commit 4c9dc62

File tree

3 files changed

+8
-3
lines changed

3 files changed

+8
-3
lines changed

examples/containers/App.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
import React from 'react';
2-
import { Dispatcher, Provider, composeStores } from 'redux';
2+
import { createDispatcher, Provider, composeStores } from 'redux';
33
import CounterApp from './CounterApp';
44
import TodoApp from './TodoApp';
55
import * as stores from '../stores/index';
66

7-
const dispatcher = new Dispatcher(composeStores(stores));
7+
const dispatcher = createDispatcher(composeStores(stores));
88

99
export default class App {
1010
render() {

src/createDispatcher.js

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
import Dispatcher from './Dispatcher';
2+
3+
export default function createDispatcher(...args) {
4+
return new Dispatcher(...args);
5+
}

src/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
// Core
2-
export Dispatcher from './Dispatcher';
2+
export createDispatcher from './createDispatcher';
33

44
// Wrapper components
55
export Provider from './components/Provider';

0 commit comments

Comments
 (0)