iSplit
1
05/17/2016
Sharing is Caring
1
iSplit
1
05/17/2016
Sharing is Caring
1
05/17/2016
2
3
05/17/2016
4
05/17/2016
5
05/17/2016
6
05/17/2016
7
05/17/2016
8
05/17/2016
9
05/17/2016
10
05/17/2016
import React from 'react';
import './header.css';
import {connect} from 'react-redux';
class Header extends React.Component {
componentWillMount() {
window.addEventListener('popstate', () => {
this.props.dispatch({
'type': 'UPDATE_ROUTE',
'payLoad': window.location.pathname
});
});
}
render() {
return <header>
<h1>iSplit</h1>
</header>;
}
}
const exports = connect(state => ({
path: state.root.path
}))(Header);
export default exports;
11
05/17/2016
12
05/17/2016
13
05/17/2016
14
05/17/2016
15
05/17/2016
16
05/17/2016