I'm using nativebase as a base for the UI side of a React Native app that I'm developing and I'm running into an error with something that should be very simple.
I want to create a component for the tab footer of the app to include in different views as follows:
./Components/Footer.js
import React, { Component } from 'react';
import {
Footer,
FooterTab,
Button,
Icon,
Text
} from 'native-base';
class TabFooter extends Component {
render() {
return (
<Footer >
<FooterTab>
<Button>
<Badge>2</Badge>
Apps
<Icon name='ios-apps-outline' />
</Button>
<Button>
Camera
<Icon name='ios-camera-outline' />
</Button>
<Button active>
Navigate
<Icon name='ios-compass' />
</Button>
<Button>
Contact
<Icon name='ios-contact-outline' />
</Button>
</FooterTab>
</Footer>
);
}
}
export default TabFooter;
And an example view would be:
import React, { Component } from 'react';
import { Container, Header, Title, Content, Footer, FooterTab, Button, Icon,
Text, List, ListItem, Input, InputGroup } from 'native-base';
import { TabFooter } from '../Components/Footer';
class EditGuest extends Component {
render() {
return (
<Container>
<Header>
<Title>Whatever title</Title>
</Header>
<Content>
</Content>
<TabFooter />
</Container>
);
}
}
export default EditGuest;
But when this view renders I'm getting the error:
ExceptionsManager.js:82 Warning: React.createElement: type should not be null, undefined, boolean, or number. It should be a string (for DOM elements) or a ReactClass (for composite components). Check the render method of `EditGuest`.
Is there something really basic that I'm missing because I would of thought that I could just simply include this component within any view without any problems...