Skip to content

Commit

Permalink
notihng works
Browse files Browse the repository at this point in the history
  • Loading branch information
iasoon committed Mar 14, 2016
1 parent 9bf202d commit f9536d0
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 1 deletion.
1 change: 1 addition & 0 deletions app/assets/javascripts/application.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -17,5 +17,6 @@
#= require turbolinks
#= require react
#= require react_ujs
#= require redux/redux
#= require components
#= require_tree .
13 changes: 13 additions & 0 deletions app/assets/javascripts/components/app.coffee
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
{ createStore, combineReducers, applyMiddleware } = Redux
{ Router, Route, browserHistory } = ReactRouter
{ syncHistoryWithStore, routerReducer } = ReactRouterRedux

store = createStore combineReducers
routing: routerReducer

history = syncHistoryWithStore browserHistory, store

class @App extends React.Component
render: ->
Provider store: store,
Route path: '/', component=Index
2 changes: 1 addition & 1 deletion app/controllers/welcome_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ class WelcomeController < ApplicationController
skip_before_filter :verify_authenticity_token, only: :token_sign_in

def index
render component: 'Index'
#render component: 'App', prerender: false
end

def token_sign_in
Expand Down

0 comments on commit f9536d0

Please sign in to comment.