invertase / react-native-material-design

React Native UI Components for Material Design
http://react-native-material-design.github.io
MIT License
3.15k stars 365 forks source link

Fixed React Native 0.26.0 incompatibility errors #65

Closed Odinvt closed 8 years ago

Odinvt commented 8 years ago

Hi, Great work with the mrn package fork. Thank you for all your efforts.

The issue

React Native version 0.26.0 poses an issue when using the React object directly from the 'react-native' package like this

import React, { Component, PropTypes } from 'react-native'
...
export default class MyClass extends Component {
...

It throws the exception Super must be function or null.

The Fix

import { Component, PropTypes } from 'react-native'
import React rom 'react'
...
export default class MyClass extends React.Component {
...

We can also use the proptypes from the React object rather than its link from the React Native module like this

import { Component } from 'react-native'
import React rom 'react'

var PropTypes = React.PropTypes
...
export default class MyClass extends React.Component {
...
mlabrum commented 8 years ago

:) should be already fixed in master https://github.com/react-native-material-design/react-native-material-design/pull/62

Odinvt commented 8 years ago

Oh cool ! Again, Great work on this package guys. Closing now.