lundi 1 août 2016

Getting error: "react.createclass is not a function"

I am a newer JS developer and I am exploring React-Native. I recently purchased "Learning React Native" by Bonnie Eisenman and am working on the very first mini-project - a very basic weather app.

Unfortunately, I can't get the code the author provides to work (see below for some of the code, or see the whole thing here). I keep getting the error "React.createClass is not a function", even though I've seen dozens of other examples where this works just fine. I've been spending hours researching and asking questions with no success. Please help!

var React = require('react-native');
var {
  StyleSheet,
  Text,
  View,
  TextInput
} = React;


var WeatherProject = React.createClass({
  ....
});

module.exports = WeatherProject;

Aucun commentaire:

Enregistrer un commentaire