To create a ReactComponent
:
ReactComponent React.createClass(object proto)
Basic JSX example:
var TitleComponent = React.createClass({
// REQUIRED
CREATE TABLE `makers` ( | |
`id` int(10) unsigned NOT NULL, | |
`name` varchar(255) NOT NULL, | |
`description` varchar(255) NOT NULL, | |
`created_at` datetime NOT NULL, | |
`updated_at` datetime NOT NULL, | |
PRIMARY KEY (`id`) | |
) ENGINE=InnoDB DEFAULT CHARSET=latin1; | |
-- |
var gulp = require('gulp'); | |
var gutil = require('gulp-util'); | |
var notify = require('gulp-notify'); | |
var sass = require('gulp-ruby-sass'); | |
var autoprefix = require('gulp-autoprefixer'); | |
var minifyCSS = require('gulp-minify-css') | |
var coffee = require('gulp-coffee'); | |
var exec = require('child_process').exec; | |
var sys = require('sys'); |
<!doctype html> | |
<html lang="es"> | |
<head> | |
<meta charset="UTF-8"> | |
<title>Validador de RUT HTML5</title> | |
</head> | |
<body> | |
<form> | |
<input type="text" id="rut" name="rut" required oninput="checkRut(this)" placeholder="Ingrese RUT"> | |
<button type="submit">Validar RUT y Enviar Form</button> |
<form action="<%= action %>" method="post"> | |
<% if (fields.length) { %> | |
<% fields.forEach(function(field){ %> | |
<label><%= field.name %></label> | |
<input type="<%= field.type %>" name="<%= field.name %>" <% if (field.property) { %> <%= field.property %> <% } %> > | |
<% }) %> | |
<% } %> | |
<button type="submit"><%= title %></button> <!--Title for button is same as that of the page--> |
/* | |
* object.watch polyfill | |
* | |
* 2012-04-03 | |
* | |
* By Eli Grey, http://eligrey.com | |
* Public Domain. | |
* NO WARRANTY EXPRESSED OR IMPLIED. USE AT YOUR OWN RISK. | |
*/ |
Assumes a fresh install of Ubuntu 12.04 LTS.
Setup the system to handle compiling and installing from source.
$ sudo apt-get install build-essential
If SSL support is needed then we will need to install libssl-dev
.
$ sudo apt-get install libssl-dev
// Use Gists to store code you would like to remember later on | |
console.log(window); // log the "window" object to the console |
/* @flow */ | |
var React = require("react") | |
var Immutable = require("immutable") | |
// In order to use any type as props, including Immutable objects, we | |
// wrap our prop type as the sole "data" key passed as props. | |
type Component<P> = ReactClass<{},{ data: P },{}> | |
type Element = ReactElement<any, any, any> |