Skip to content

Commit ff60927

Browse files
committed
upgrade
1 parent 7d4672e commit ff60927

File tree

33 files changed

+389
-802
lines changed

33 files changed

+389
-802
lines changed

docs/public/assets/bundle.js

Lines changed: 35 additions & 36 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "react-redux-bootstrap-webpack-starter",
3-
"version": "0.5.0",
3+
"version": "0.6.0",
44
"description": "react js + redux + react router + hot reload + devTools + bootstrap + webpack starter",
55
"main": "src/index.js",
66
"scripts": {
@@ -81,6 +81,7 @@
8181
},
8282
"dependencies": {
8383
"animate.css": "3.5.1",
84+
"axios": "^0.15.3",
8485
"babel-polyfill": "^6.16.0",
8586
"bootstrap": "^3.3.7",
8687
"classnames": "^2.2.5",
@@ -89,7 +90,6 @@
8990
"js-base64": "^2.1.9",
9091
"moment": "^2.17.0",
9192
"react": "^15.4.1",
92-
"react-addons-shallow-compare": "^15.4.1",
9393
"react-bootstrap": "^0.30.7",
9494
"react-dom": "^15.4.1",
9595
"react-hot-loader": "^3.0.0-beta.6",
Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
import React, {
2+
PureComponent,
3+
PropTypes
4+
} from 'react';
5+
import cx from 'classnames';
6+
7+
const ANIMATION_DELAY_MS = 500;
8+
9+
class AnimatedView extends PureComponent {
10+
state = {
11+
animated: true,
12+
viewEnters: false
13+
};
14+
15+
componentDidMount() {
16+
const { delay } = this.props;
17+
18+
this.enterAnimationTimer = setTimeout(
19+
() => this.setState({viewEnters: true}),
20+
delay
21+
);
22+
}
23+
24+
componentWillUnmount() {
25+
clearTimeout(this.enterAnimationTimer);
26+
}
27+
28+
render() {
29+
const { animated, viewEnters } = this.state;
30+
const { children } = this.props;
31+
32+
return (
33+
<section
34+
className={
35+
cx({
36+
'content': true,
37+
'invisible': !viewEnters && animated,
38+
'view-enter': viewEnters && animated
39+
})
40+
}>
41+
{ children }
42+
</section>
43+
);
44+
}
45+
}
46+
47+
AnimatedView.propTypes = {
48+
children: PropTypes.node,
49+
delay: PropTypes.number
50+
};
51+
52+
AnimatedView.defaultProps = {
53+
delay: ANIMATION_DELAY_MS
54+
};
55+
56+
export default AnimatedView;

src/app/components/index.js

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,9 @@
11
import Jumbotron from './jumbotron/Jumbotron';
22
import NavigationBar from './navigation/NavigationBar';
33
import BackToTop from './backToTop/BackToTop';
4-
import WizardMotion from './wizardMotion/WizardMotion';
54

65
export {
76
Jumbotron,
87
NavigationBar,
9-
BackToTop,
10-
WizardMotion
8+
BackToTop
119
};

src/app/components/navigation/leftNav/leftNavButton/LeftNavButton.js

Lines changed: 5 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,10 @@
11
import React, {
2-
Component,
2+
PureComponent,
33
PropTypes
44
} from 'react';
55
import { Link } from 'react-router';
6-
import shallowCompare from 'react-addons-shallow-compare';
7-
8-
class LeftNavButton extends Component {
9-
10-
shouldComponentUpdate(nextProps, nextState) {
11-
return shallowCompare(this, nextProps, nextState);
12-
}
136

7+
class LeftNavButton extends PureComponent {
148
render() {
159
const { link, label } = this.props;
1610
return (
@@ -31,10 +25,10 @@ class LeftNavButton extends Component {
3125
}
3226

3327
LeftNavButton.propTypes = {
34-
link: PropTypes.string,
35-
label: PropTypes.string,
28+
link: PropTypes.string,
29+
label: PropTypes.string,
3630
viewName: PropTypes.string,
37-
onClick: PropTypes.func
31+
onClick: PropTypes.func
3832
};
3933

4034
export default LeftNavButton;

src/app/components/navigation/rightNav/rightNavButton/RightNavButton.js

Lines changed: 5 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,10 @@
11
import React, {
2-
Component,
2+
PureComponent,
33
PropTypes
44
} from 'react';
55
import { Link } from 'react-router';
6-
import shallowCompare from 'react-addons-shallow-compare';
7-
8-
class RightNavButton extends Component {
9-
10-
shouldComponentUpdate(nextProps, nextState) {
11-
return shallowCompare(this, nextProps, nextState);
12-
}
136

7+
class RightNavButton extends PureComponent {
148
render() {
159
const { link, label } = this.props;
1610
return (
@@ -31,10 +25,10 @@ class RightNavButton extends Component {
3125
}
3226

3327
RightNavButton.propTypes = {
34-
link: PropTypes.string,
35-
label: PropTypes.string,
28+
link: PropTypes.string,
29+
label: PropTypes.string,
3630
viewName: PropTypes.string,
37-
onClick: PropTypes.func
31+
onClick: PropTypes.func
3832
};
3933

4034
export default RightNavButton;

src/app/components/wizardMotion/WizardMotion.js

Lines changed: 0 additions & 227 deletions
This file was deleted.

0 commit comments

Comments
 (0)