title: undefined is not a function (near '...React.createClass...')
body: <p>I'm trying to get this library working: <a href="https://github.com/gcanti/tcomb-form-native" rel="nofollow noreferrer">https://github.com/gcanti/tcomb-form-native</a></p>
  
  <p>However when I run it on my local machine I get the error: <code>undefined is not a function (near '...React.createClass...')</code></p>
  
  <p>The only hint that I could find is here: <a href="https://github.com/jayesbe/react-native-cacheable-image/issues/60" rel="nofollow noreferrer">https://github.com/jayesbe/react-native-cacheable-image/issues/60</a> where someone stated that React 16 removed createClass. </p>
  
  <p>When I follow the steps here <a href="https://reactjs.org/blog/2017/04/07/react-v15.5.0.html#migrating-from-reactcreateclass" rel="nofollow noreferrer">https://reactjs.org/blog/2017/04/07/react-v15.5.0.html#migrating-from-reactcreateclass</a></p>
  
  <p>I get an error involving promises. I'm not too clear how to use this library and would appreciate some guidance. </p>
  
  <p>edit: the example code:</p>
  
  <pre><code>// index.ios.js
  
  'use strict';
  
  var React = require('react-native');
  var t = require('tcomb-form-native');
  var { AppRegistry, StyleSheet, Text, View, TouchableHighlight } = React;
  
  var Form = t.form.Form;
  
  // here we are: define your domain model
  var Person = t.struct({
    name: t.String,              // a required string
    surname: t.maybe(t.String),  // an optional string
    age: t.Number,               // a required number
    rememberMe: t.Boolean        // a boolean
  });
  
  var options = {}; // optional rendering options (see documentation)
  
  var AwesomeProject = React.createClass({
  
    onPress: function () {
      // call getValue() to get the values of the form
      var value = this.refs.form.getValue();
      if (value) { // if validation fails, value will be null
        console.log(value); // value here is an instance of Person
      }
    },
  
    render: function() {
      return (
        &lt;View style={styles.container}&gt;
          {/* display */}
          &lt;Form
            ref="form"
            type={Person}
            options={options}
          /&gt;
          &lt;TouchableHighlight style={styles.button} onPress={this.onPress} underlayColor='#99d9f4'&gt;
            &lt;Text style={styles.buttonText}&gt;Save&lt;/Text&gt;
          &lt;/TouchableHighlight&gt;
        &lt;/View&gt;
      );
    }
  });
  
  var styles = StyleSheet.create({
    container: {
      justifyContent: 'center',
      marginTop: 50,
      padding: 20,
      backgroundColor: '#ffffff',
    },
    buttonText: {
      fontSize: 18,
      color: 'white',
      alignSelf: 'center'
    },
    button: {
      height: 36,
      backgroundColor: '#48BBEC',
      borderColor: '#48BBEC',
      borderWidth: 1,
      borderRadius: 8,
      marginBottom: 10,
      alignSelf: 'stretch',
      justifyContent: 'center'
    }
  });
  </code></pre>