class Parent extends Component {
с{
alert('work');
}
render() {
return (
<div>
<Child с={()=>this.c()}/>
</div>
);
}
}
class Child extends Component {
render() {
return (
<div><button onClick={() => this.props.c()}>c</button></div>
);
}
}
import React from "react";
import ReactDOM from "react-dom";
import {Router, hashHistory} from "react-router";
import {syncHistoryWithStore} from "react-router-redux";
import {Provider} from "react-redux";
import routes from "./routes";
import thunk from "redux-thunk";
import {createStore, applyMiddleware, compose} from "redux";
import reducers from "./reducers";
import loger from "./middleware";
const composeEnhancers = window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__ || compose;
const store = createStore(reducers, composeEnhancers(
applyMiddleware(loger, thunk)
));
const history = syncHistoryWithStore(hashHistory, store)
ReactDOM.render(
<Provider store={store}>
<MuiThemeProvider>
<Router history={history} routes={routes}>
</Router>
</MuiThemeProvider>
</Provider>,
document.getElementById('root')
);
export const ADD_USER = 'ADD_USER';
а импорт закомментируйте ради эксперимента