git ssb

1+

dinoworm ๐Ÿ› / catstack



Commit 4cb19feb19f09ec24e9ab9ee78c7df9337ce2f68

more plates to boil

Michael Williams committed on 11/29/2015, 12:41:30 AM
Parent: bddcd75da91760d6e309a822e422b3027b1b9dfd

Files changed

app/client.jschanged
app/containers/landing.jsadded
app/reducers/todos.jschanged
app/routes.jschanged
app/store.jschanged
app/state.jsdeleted
package.jsonchanged
app/client.jsView
@@ -4,16 +4,13 @@
44 import { reduxReactRouter, routerStateReducer, ReduxRouter } from 'redux-router';
55 const { Provider } = require('react-redux')
66 const thunk = require('redux-thunk')
77
8-const initialState = require('app/state')
98 const configureStore = require('app/store')
10-const { getAllTodos } = require('app/actions')
9+const { findTodos } = require('app/actions')
1110 const Root = require('app/containers/root')
1211
13-const store = configureStore(
14- initialState
15-)
12+const store = configureStore()
1613
1714 //store.dispatch(getAllTodos())
1815
1916 render(
app/containers/landing.jsView
@@ -1,0 +1,14 @@
1+const React = require('react')
2+const { connect } = require('react-redux')
3+
4+class Landing extends React.Component {
5+ render () {
6+ return <div>
7+ landing!
8+ </div>
9+ }
10+}
11+
12+module.exports = connect(
13+ (state) => { return {} }
14+)(Landing)
app/reducers/todos.jsView
@@ -1,17 +1,12 @@
1-const initialState = require('app/state')
2-
31 module.exports = todos
42
5-function todos (state = initialState, action) {
3+function todos (state = {}, action) {
64 switch (action.type) {
7- case 'ADD_TODO':
5+ case 'CREATE_TODO':
86 return {
97 ...state,
10- todos: {
11- ...state.todos,
12- [action.payload.id]: action.payload
13- }
8+ [action.payload.id]: action.payload
149 }
1510 default:
1611 return state
1712 }
app/routes.jsView
@@ -1,13 +1,15 @@
11 const React = require('react')
2-const { Route } = require('react-router')
2+const { Route, IndexRoute } = require('react-router')
33
44 const App = require('app/containers/app')
5+const Landing = require('app/containers/landing')
56 const Todos = require('app/containers/todos')
67 const NoMatch = require('app/containers/no-match')
78
89 const routes = (
910 <Route path='/' component={App}>
11+ <IndexRoute component={Landing} />
1012 <Route path='todos' component={Todos} />
1113 <Route path="*" component={NoMatch} />
1214 </Route>
1315 )
app/store.jsView
@@ -1,8 +1,7 @@
11 const { createStore, compose, applyMiddleware } = require('redux')
22 const thunk = require('redux-thunk')
3-const logger = require('redux-logger')
4-const { reduxReactRouter, routerStateReducer, ReduxRouter } = require('redux-router')
3+const { reduxReactRouter } = require('redux-router')
54 const { createHistory } = require('history')
65
76 const reducer = require('app/reducers')
87 const routes = require('routes')
@@ -12,8 +11,9 @@
1211
1312 middleware.push(thunk)
1413
1514 if (process.env.NODE_ENV === 'development') {
15+ var logger = require('redux-logger')
1616 var { persistState } = require('redux-devtools')
1717
1818 var DevTools = require('app/components/dev-tools')
1919 }
app/state.jsView
@@ -1,3 +1,0 @@
1-module.exports = {
2- todos: {}
3-}
package.jsonView
@@ -12,9 +12,9 @@
1212 "feature": "node feature",
1313 "dev:client": "budo client --dir assets --serve bundle.js --live --pushstate -- -dv",
1414 "dev:assets": "cpx \"app/assets/**/*\" assets -w",
1515 "dev:server": "nodemon server",
16- "prod:client": "browserify client -o assets/bundle.js -g uglifyify",
16+ "prod:client": "browserify client -o assets/bundle.js -g envify -g uglifyify",
1717 "prod:assets": "cpx \"app/assets/**/*\" assets",
1818 "prod:server": "node server",
1919 "dev": "NODE_ENV=development npm-run-all -p dev:*",
2020 "prod": "NODE_ENV=production npm-run-all -s prod:*"
@@ -80,9 +80,9 @@
8080 "react-dom": "^0.14.3",
8181 "react-redux": "^4.0.0",
8282 "react-router": "^1.0.0",
8383 "redux": "^3.0.4",
84- "redux-router": "^1.0.0-beta4",
84+ "redux-router": "^1.0.0-beta5",
8585 "redux-thunk": "^1.0.0",
8686 "sheetify": "^3.1.0",
8787 "uglifyify": "^3.0.1"
8888 }

Built with git-ssb-web