Kureev / react-native-navbar

Navbar component for React Native

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

install react-native-navbar

cyaxares opened this issue · comments

I installed react-native-navbar, But while using showed error like pic:

navbar3
I checked and It existed before , I also removed it and installed by npm

Code:

'use strict';

import React, { Component } from 'react';
import{
  View,
  Text,
  StyleSheet

} from 'react-native';
import NavigationBar from 'react-native-navbar';

class Header extends Component {
    render() {
      const rightButtonConfig = {
        title: 'Next',
        handler: () => alert('hello!')
      };
      const titleConfig = {
        title: 'Hello, world',
      };

      return (
        <View>
          <NavigationBar
            title={titleConfig}
            rightButton={rightButtonConfig} />
        </View>
      );
    }
}
export default Header;

what's the problem?

Most likely your packager needs a restart. Try to shut down your packager process and restart the app.

What do u mean by "packager"? npm or react-native?

At the moment when you start react-native application, xcode (or react-native run-ios/android script) starts a packager - CLI tool that makes a JS bundle that runs on your simulator/device. Usually, it opens in a new terminal window and looks like this:
image

Did you manage to solve your issue? If so, can you please tell us what helped and close this one?

Yes, i do install nativebase.

Thanks