0

I've just worked through the "getting started" tutorial for vue native, and have my device set up running my vue native app in EXPO.

I wanted to add a toolbar, so I looked up how to do this, and found the ActionBar element, so I added it in my code like so:

export default class App extends React.Component {
  render() {
    return (
      <View style={styles.container}>
        <ActionBar title="main menu">

        </ActionBar>
      </View>
    );
  }
}

But I got the following error:

Can't find variable: ActionBar

So I tried to fix the error myself by changing this line

import { StyleSheet, Text, View } from 'react-native';

to be

import { StyleSheet, Text, View, ActionBar } from 'react-native';

But now I am getting the error

Element type is invalid: expected a string (for built-in components) or a class/function but got: undefined

Please help me to find how to import ActionBar correctly.

0

I think there is no ActionBar component is react native if you still want to use ActionBar so you can use this library react-native-action-bar

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.