Skip to content

Commit 471e058

Browse files
committed
Fix examples since we don't do es7 statics ⚡
1 parent 4bea5c1 commit 471e058

File tree

3 files changed

+22
-20
lines changed

3 files changed

+22
-20
lines changed

examples/animations/app.js

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -20,10 +20,6 @@ const history = useBasename(createHistory)({
2020
* renders the new, transitioning-in component immediately afterward.
2121
*/
2222
class RouteCSSTransitionGroup extends React.Component {
23-
static contextTypes = {
24-
location: React.PropTypes.object
25-
}
26-
2723
constructor(props, context) {
2824
super(props, context)
2925

@@ -61,6 +57,11 @@ class RouteCSSTransitionGroup extends React.Component {
6157
}
6258
}
6359

60+
61+
RouteCSSTransitionGroup.contextTypes = {
62+
location: React.PropTypes.object
63+
}
64+
6465
class App extends React.Component {
6566
render() {
6667
return (

examples/breadcrumbs/app.js

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,6 @@ const history = useBasename(createHistory)({
1010
})
1111

1212
class App extends React.Component {
13-
static title = 'Home'
14-
static path = '/'
15-
1613
render() {
1714
const depth = this.props.routes.length
1815

@@ -45,10 +42,11 @@ class App extends React.Component {
4542
}
4643
}
4744

48-
class Products extends React.Component {
49-
static title = 'Products'
50-
static path = '/products'
45+
App.title = 'Home'
46+
App.path = '/'
5147

48+
49+
class Products extends React.Component {
5250
render() {
5351
return (
5452
<div className="Page">
@@ -58,10 +56,10 @@ class Products extends React.Component {
5856
}
5957
}
6058

61-
class Orders extends React.Component {
62-
static title = 'Orders'
63-
static path = '/orders'
59+
Products.title = 'Products'
60+
Products.path = '/products'
6461

62+
class Orders extends React.Component {
6563
render() {
6664
return (
6765
<div className="Page">
@@ -71,6 +69,9 @@ class Orders extends React.Component {
7169
}
7270
}
7371

72+
Orders.title = 'Orders'
73+
Orders.path = '/orders'
74+
7475
render((
7576
<Router history={history}>
7677
<Route path={App.path} component={App}>

examples/huge-apps/components/GlobalNav.js

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -26,13 +26,6 @@ styles.activeLink = {
2626

2727
class GlobalNav extends React.Component {
2828

29-
static defaultProps = {
30-
user: {
31-
id: 1,
32-
name: 'Ryan Florence'
33-
}
34-
}
35-
3629
constructor(props, context) {
3730
super(props, context)
3831
this.logOut = this.logOut.bind(this)
@@ -61,4 +54,11 @@ class GlobalNav extends React.Component {
6154
}
6255
}
6356

57+
GlobalNav.defaultProps = {
58+
user: {
59+
id: 1,
60+
name: 'Ryan Florence'
61+
}
62+
}
63+
6464
export default GlobalNav

0 commit comments

Comments
 (0)