recr0ns / react-native-material-switch

MIT License
80 stars 83 forks source link

react.createclass is not a function #29

Open developer239 opened 7 years ago

thebuddha commented 7 years ago

same problem

roots-ai commented 7 years ago

How did this got resolveD?

nidaorhan commented 7 years ago

There is a mistake in the index.js file.

go to node_modules/react-native-material-switch/index.js and change the import statements like this:

import React         from 'react'
import {
  PanResponder,
  View,
  TouchableHighlight,
  Animated,
}                    from 'react-native'
aligfl commented 7 years ago

I think the npm version has to be updated. because I used the index.js version and it worked. The npm version doesn't match the version that's posted here.

skv-headless commented 6 years ago

fixed in master. @recr0ns please publish new version

pencilcheck commented 6 years ago
Warning: React.createClass is no longer supported. Use a plain JavaScript class instead. If you're not yet ready to migrate, create-react-class is available on npm as a drop-in replacement. (https://fb.me/migrating-from-react-create-class)
airTradies commented 5 years ago

This error still occurs. Why are you still using createClass? Please fix.