Last active
November 11, 2016 19:02
-
-
Save tphdev/0b78d32aee3117573d53e5a869d5f55a to your computer and use it in GitHub Desktop.
View Controller for React Components
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const React = require('react') | |
const HomeView = require('./component-homeview.js') | |
const ACTIONS = require('./actions.js') | |
const STORE = require('./store.js') | |
const AppViewController = React.createClass({ | |
getInitialState: function(){ | |
let startingState = {} | |
return startingState | |
}, | |
componentWillMount: function(){ | |
//STORE.onChange(...) | |
} | |
render: function(){ | |
switch(this.props.routedFrom){ | |
case: "HomeView" | |
return <HomeView /> | |
break; | |
default: | |
return <div><h1>Yolo!!</h1></div> | |
} | |
} | |
}) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment