- ReactJS Awesome Free Course
- Redux Understanding
- Cartoon Intro to Redux
- Cartoon Guide to Flux
- Phoenix, React, Redux example
- Publishing Model Changes to a Phoenix Channel
- Using GenEvent to Notify a Channel of Updates in Elixir
- index_bundle.js:11089 Warning: Each child in an array or iterator should have a unique "key" prop. Check the render method of
ForecastUI
. See https://fb.me/react-warning-keys for more information.
https://www.viget.com/articles/gemify-your-client-side-app-for-rails
fn(data) = view
{} => Single curly braces is data to interpolate
{{}} => Duble curly braces is object interpolated
wrap returned value in render, using div or another component
F = Focussed
I = Independent
R = Reusable
S = Small
T = Testable
{this.props.children}
// Add props to Route like normal component
{this.props.route.header}
// Add styles as object
getInitialState: function({username: ''});
onChange function sync with value
this.setState({username: e.target.value}
this.props.routeParams.playerOne // playerOne coming from route
contextTypes: {
router: React.PropTypes.object.isRequired
}
this.context.router.push({
pathName: '/battle',
query: {
playerOne: this.props.routerParams.playerOne,
playerTwo: this.state.username
}
})
separate container from ui components
propTypes: {
header: React.PropTypes.string.isRequired
}
// funtion stateless component
// Add properties on functions as properties