React

From Wiki2
Revision as of 13:31, 28 September 2015 by Tim (talk | contribs) (→‎react-router)


https://mail.google.com/mail/u/0/#inbox/14fb843aaad89ffe

http://react.rocks/tag/WebSockets

https://github.com/gritzko/todomvc-swarm

https://github.com/kriasoft/react-starter-kit

http://tylermcginnis.com/reactjs-tutorial-pt-2-building-react-applications-with-gulp-and-browserify/

https://facebook.github.io/react/docs/forms.html

https://facebook.github.io/react/docs/interactivity-and-dynamic-uis.html

http://react-bootstrap.github.io/components.html#input

http://javascript.tutorialhorizon.com/2015/06/06/using-context-and-childcontext-in-react/

react-router

as of 1.0.0-rc1 9/28/15

with es6 classes mixins are not allowed

see http://10.0.1.150/react/sb/cascada-webpack/app/components/Signup.js

so mixins[Navigation] doesn't work

after you define the class and before you export add an object called contextTypes with a key of router like so

Signup.contextTypes = {
  router: React.PropTypes.func.isRequired
};
module.exports = Signup;

then you can use transitionTo like so:

this.context.router.transitionTo('login')

with React.creatClass({})

see http://10.0.1.150/react/sb/cascada-webpack/app/components/Yard.js
   var Navigation = require('react-router').Navigation;
   ...
   var Yard = React.createClass({
   	mixins: [Navigation],
   ...
   this.transitionTo('reg')