DickyT / react-native-textinput-utils

A react native extension which allows you to control TextInput better.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Super expression must either be null or a function, not undefined

siemya opened this issue · comments

react-native version 0.26.1

image

@williambout how did you fixed this problem.

@siemya Can you attach a screenshot of the error trackback of RN or XCode?

@siemya I used the fork from @evollu

@siemya do you see this issue in RN26?

@evollu i used to have this problem on 0.26.1, i started to get #5 after i upgraded to 0.27.

@siemya seems like a problem related to babel, I am going to install RN 0.27 and try run my demo again.

I am still installing my new version of RN, because my global RN is used in an on-progress project and I can't upgrade it, so I am dealing with the package dependence issues.

@siemya @williambout And I noticed a requirement of babel, and I wrote in README, did you guys forget to configure the ES7 parsing options in babel?

Using this package in other project

You might need to add the es7.classProperties into your PROJECT_ROOT/npm_modules/react-native/packager/transformer.js and PROJECT_ROOT/npm_modules/react-native/packager/react-packager/.babelrc

@DickyT I actually didn't do any configuration for ES7. And didn't understand how to do it in a proper way, isn't it nasty to edit a file inside a npm module? Or is there a way to add a babel configuration file to the project itself?

@siemya try it and see if this change can solve this problem, because this feature can make me write my RN code like this, should be more clear than before.

Actually that 2 file is part of your project, I think if you are not removing react-native and this file will not be modified, I think I can't find any other way to do this.

class ReactNativeObjectClass extends Component {
    render() {
        super.render();
    }
}

@DickyT I don't think editing a npm file is a good idea, incase someone else will build the project from scratch. Btw after the upgrade to 0.27 i don't get the super expression error anymore like i said. Do you think error #5 is associated with ES7?

#5 should be a XCode error, not related to JSX. Seems 0.27 set the es7.classProperties by default, but I am still installing 0.27, I will try to run and fix that after my installation is done. The network sensoring in China makes the installation stuck at 5%, stilling finding some solution to make it right.

Referer to #5