最近写react native发现一个坑,
出现这个错误:
null is not an object (evaluating 'inst.componentWillReceiveProps')
坑的是完全没有提示是哪个类出错了。
后面发现在render函数里面使用了//进行注释代码~
真的是醉了,JSX中是不能使用//做注释,如果一定要用,需要用{}包起来~
最近写react native发现一个坑,
出现这个错误:
null is not an object (evaluating 'inst.componentWillReceiveProps')
坑的是完全没有提示是哪个类出错了。
后面发现在render函数里面使用了//进行注释代码~
真的是醉了,JSX中是不能使用//做注释,如果一定要用,需要用{}包起来~