#React JS
- is an Open Source library (BSD License)
- for 'V' in MVC
- developed by Facebook
- uses 'Component-Driven' architecture (Web Components)
- uses 'Virtual DOM' for Performance
- uses 'state' and 'props' for data flow
- uses JSX Syntax
#React JS
| import React, {Component} from 'react'; | |
| import {connect} from 'react-redux'; | |
| import {bindActionCreators} from 'redux'; | |
| class DummyTemplatePage extends React.Component { | |
| constructor(props, context){ | |
| super(props,context); | |
| } |
| { | |
| "name": "react-redux-demo", | |
| "version": "1.0.0", | |
| "description": "CGI React-Redux Training", | |
| "author": "Santhosh Vijay", | |
| "license": "MIT", | |
| "dependencies": { | |
| "babel-polyfill": "6.8.0", | |
| "bootstrap": "3.3.6", | |
| "jquery": "2.2.3", |
| import React from 'react'; | |
| import ReactDOM from 'react-dom'; | |
| import {Router, Route, browserHistory } from 'react-router'; | |
| import HomePage from './home-page' | |
| import MoviePoster from './movie-poster'; | |
| import MovieDetails from './movie-details'; | |
| //ES6 Const Keyword | |
| const app = document.getElementById('app'); |
| <!DOCTYPE html> | |
| <html lang="en"> | |
| <head> | |
| <meta charset="UTF-8"> | |
| <title>CGI Dev Central</title> | |
| <link rel="stylesheet" href="//maxcdn.bootstrapcdn.com/bootstrap/3.2.0/css/bootstrap.min.css"/> | |
| <style> | |
| .form-control, | |
| .btn, | |
| .badge { |
| /** | |
| * @jsx React.DOM | |
| */ | |
| var React = require('react'), | |
| MyReactComponent = React.createClass({ | |
| // The object returned by this method sets the initial value of this.state | |
| getInitialState: function(){ | |
| return {}; |
| html { | |
| height: 100%; | |
| } | |
| body { | |
| background: #f2f2f2; | |
| font-family: Roboto; | |
| display: flex; | |
| justify-content: center; | |
| align-items: center; |
The following document is a written account of the Code School screencasting framework. It should be used as a reference of the accompanying screencast on the topic.
You're probably aren't going to take the time to read this document if you're not interested, but there are a lot of nice side effects caused by learning how to create quality screencasts.