ios - React Native Stateless component saying undefined -
i'm trying create component using react native so: export class indicatoroverlay extends component { render() { return ( <view> <text>text</text> </view> ); } }; the above works, when try make stateless so... export default ({ text = 'text' }) => { return ( <view> <text>{text}</text> </view> ); }; i following error: element type invalid: expected string (for built-in components) or class/function (for composite components) got: undefined. forgot export component file it's defined in. i'm sure i'm missing basic, can't see it. use similar stateless component in react web app , it's fine. using react 16.0.0-alpha.6 , react-native 0.43.2, , seeing error in iphone simulator. hope can :) this because first example named export, while second 1 default 1 therefore way need import them different. assuming import module this: ...