diff --git a/example/components/DrawerNavigationExample.js b/example/components/DrawerNavigationExample.js
index 7b9e96f..7d5a73f 100644
--- a/example/components/DrawerNavigationExample.js
+++ b/example/components/DrawerNavigationExample.js
@@ -1,7 +1,6 @@
import React, { Component } from 'react';
import {
StyleSheet,
- View,
Text,
Image,
} from 'react-native';
@@ -14,6 +13,14 @@ import {
import { Ionicons } from '@exponent/vector-icons';
import { Router } from '../main';
+class Heading extends DrawerNavigationChild {
+ renderDrawerItem() {
+ return (
+ {this.props.title}
+ );
+ }
+}
+
export default class DrawerNavigationExample extends Component {
_renderHeader = () => {
@@ -69,9 +76,7 @@ export default class DrawerNavigationExample extends Component {
initialRoute={Router.getRoute('home')}
/>
-
- Meta
-
+
{
}
invariant(
- child.type === ExNavigationDrawerItem || child.type === ExNavigationDrawerChild,
- 'All children of DrawerNavigation must be DrawerNavigationItems or DrawerNavigationChilds.',
+ child.type instanceof Object && ExNavigationDrawerChild.prototype.isPrototypeOf(child.type.prototype),
+ 'All children of DrawerNavigation must be DrawerNavigationChild descendant components.'
);
return child;