react-nativeを使ってアプリを作っています。
react-native-cli: 2.0.1
react-native: 0.42.3
ローディングの画像を表示しようとしてActivityIndicatorIOSを使ってみたところエラーがでました。
element type is invalid:expected a string (for built-in components) or a class/function(for composite components) but got:undefined. Check the render method of 'Test'
コードはこちらです
javascript
1import React, { 2 Component, 3} from 'react'; 4import {StyleSheet, 5 Text, 6 View, 7 ActivityIndicatorIOS, 8} from "react-native"; 9 10export default Test = React.createClass({ 11 render() { 12 return( 13 <ActivityIndicatorIOS /> 14 ); 15 } 16});
ちなみに<ActivityIndicatorIOS />
を<Text />
等にすると正常に表示されます。
これを修正するにはどのようにすれば良いか教えて頂けませんでしょうか。
よろしくお願い致します。
回答1件
あなたの回答
tips
プレビュー
バッドをするには、ログインかつ
こちらの条件を満たす必要があります。
2017/03/22 10:19