message: Update to the Twitter example to reflect the new badge related props that has been introduced. Using the 'setState' hook since it is simpler and the existing content is already exported as a functional component.
diff: -import React from 'react';
  +import React, {useState} from 'react';
  import {Platform} from 'react-native';
  import {StateNavigator} from 'navigation';
  import {NavigationHandler} from 'navigation-react';
  @@ -24,15 +24,22 @@ timeline.renderScene = ({id}) => <Timeline timeline={getTimeline(id)} />;
  var notificationsNavigator = new StateNavigator(stateNavigator);
  stateNavigator.navigate('home');
  -export default () => (
  - Platform.OS === 'ios' ? (
  - <TabBarIOS>
  +export default() => {
  + const [isNotified,
  + setIsNotified] = useState(false);
  + return (Platform.OS === 'ios'
  + ? (<TabBarIOS>
  <TabBarItemIOS title="Home">
  <NavigationHandler stateNavigator={stateNavigator}>
  <NavigationStack/>
  </NavigationHandler>
  </TabBarItemIOS>
  - <TabBarItemIOS title="Notifications" onPress={() => {
  + <TabBarItemIOS
  + title="Notifications"
  + badge={!isNotified?getFollows().length:null}
  + /* badgeColor="red" */
  + onPress={() => {
  + setIsNotified(!isNotified?!isNotified:isNotified);
  if (!notificationsNavigator.stateContext.state)
  notificationsNavigator.navigate('notifications');
  }}>
  @@ -41,12 +48,16 @@ export default () => (
  </NavigationHandler>
  </TabBarItemIOS>
  </TabBarIOS>
  - ) : (
  - <NavigationHandler stateNavigator={stateNavigator}>
  + )
  + : (<NavigationHandler stateNavigator={stateNavigator}>
  <NavigationStack
  - crumbStyle={from => from ? 'scale_in' : 'scale_out'}
  - unmountStyle={from => from ? 'slide_in' : 'slide_out'}>
  - </NavigationStack>
  + crumbStyle={from => from
  + ? 'scale_in'
  + : 'scale_out'}
  + unmountStyle={from => from
  + ? 'slide_in'
  + : 'slide_out'}></NavigationStack>
  </NavigationHandler>
  )
  );
  +}
  