Commit 00fce82fda471a7156efa91c8394284f90e88743
rename containers as such
Michael Williams committed on 12/28/2015, 12:23:01 AMParent: 8e0465732e7576207529e4e7fb9cafdda78a657d
Files changed
app/containers/app.js | changed |
app/containers/landing.js | changed |
app/containers/no-match.js | changed |
app/containers/todos.js | changed |
app/routes.js | changed |
app/containers/app.js | ||
---|---|---|
@@ -1,8 +1,8 @@ | ||
1 | 1 | const React = require('react') |
2 | 2 | const { connect } = require('react-redux') |
3 | 3 | |
4 | -class App extends React.Component { | |
4 | +class AppContainer extends React.Component { | |
5 | 5 | render () { |
6 | 6 | const { children } = this.props |
7 | 7 | |
8 | 8 | return <div> |
@@ -12,6 +12,6 @@ | ||
12 | 12 | } |
13 | 13 | } |
14 | 14 | |
15 | 15 | module.exports = connect( |
16 | - (state) => { return {} } | |
17 | -)(App) | |
16 | + (state) => ({}) | |
17 | +)(AppContainer) |
app/containers/landing.js | ||
---|---|---|
@@ -1,14 +1,14 @@ | ||
1 | 1 | const React = require('react') |
2 | 2 | const { connect } = require('react-redux') |
3 | 3 | |
4 | -class Landing extends React.Component { | |
4 | +class LandingContainer extends React.Component { | |
5 | 5 | render () { |
6 | 6 | return <div> |
7 | 7 | landing! |
8 | 8 | </div> |
9 | 9 | } |
10 | 10 | } |
11 | 11 | |
12 | 12 | module.exports = connect( |
13 | - (state) => { return {} } | |
14 | -)(Landing) | |
13 | + (state) => ({}) | |
14 | +)(LandingContainer) |
app/containers/no-match.js | ||
---|---|---|
@@ -1,14 +1,14 @@ | ||
1 | 1 | const React = require('react') |
2 | 2 | const { connect } = require('react-redux') |
3 | 3 | |
4 | -class NoMatch extends React.Component { | |
4 | +class NoMatchContainer extends React.Component { | |
5 | 5 | render () { |
6 | 6 | return <div> |
7 | 7 | no match! |
8 | 8 | </div> |
9 | 9 | } |
10 | 10 | } |
11 | 11 | |
12 | 12 | module.exports = connect( |
13 | - (state) => { return {} } | |
14 | -)(NoMatch) | |
13 | + (state) => ({}) | |
14 | +)(NoMatchContainer) |
app/containers/todos.js | ||
---|---|---|
@@ -1,14 +1,14 @@ | ||
1 | 1 | const React = require('react') |
2 | 2 | const { connect } = require('react-redux') |
3 | 3 | |
4 | -class Todos extends React.Component { | |
4 | +class TodosContainer extends React.Component { | |
5 | 5 | render () { |
6 | 6 | return <div> |
7 | 7 | todo list! |
8 | 8 | </div> |
9 | 9 | } |
10 | 10 | } |
11 | 11 | |
12 | 12 | module.exports = connect( |
13 | - (state) => { return {} } | |
14 | -)(Todos) | |
13 | + (state) => ({}) | |
14 | +)(TodosContainer) |
app/routes.js | ||
---|---|---|
@@ -1,17 +1,17 @@ | ||
1 | 1 | const React = require('react') |
2 | 2 | const { Route, IndexRoute } = require('react-router') |
3 | 3 | |
4 | -const App = require('app/containers/app') | |
5 | -const Landing = require('app/containers/landing') | |
6 | -const Todos = require('app/containers/todos') | |
7 | -const NoMatch = require('app/containers/no-match') | |
4 | +const AppContainer = require('app/containers/app') | |
5 | +const LandingContainer = require('app/containers/landing') | |
6 | +const TodosContainer = require('app/containers/todos') | |
7 | +const NoMatchContainer = require('app/containers/no-match') | |
8 | 8 | |
9 | 9 | const routes = ( |
10 | - <Route path='/' component={App}> | |
11 | - <IndexRoute component={Landing} /> | |
12 | - <Route path='todos' component={Todos} /> | |
13 | - <Route path="*" component={NoMatch} /> | |
10 | + <Route path='/' component={AppContainer}> | |
11 | + <IndexRoute component={LandingContainer} /> | |
12 | + <Route path='todos' component={TodosContainer} /> | |
13 | + <Route path="*" component={NoMatchContainer} /> | |
14 | 14 | </Route> |
15 | 15 | ) |
16 | 16 | |
17 | 17 | module.exports = routes |
Built with git-ssb-web