首页 > 其他 > 详细

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

时间:2017-07-03 22:04:59      阅读:1338      评论:0      收藏:0      [点我收藏+]

按照之前买的用JavaScript开发移动应用的例子来编写的,然后报了这个错。我的头部声明是这样的

var React = require(‘react-native‘);
var {
Text,
View
} = React;

经过查询后是由于‘React‘和‘Component‘从‘react native‘分离到了‘react‘模块。
所以这里我们只引入‘react native‘的模块是不够的,改成这样:

import React, { Component } from ‘react‘;
import {
AppRegistry,
StyleSheet,
Text,
View
} from ‘react-native‘;

 

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

原文:http://www.cnblogs.com/liulipeng/p/7112870.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!