Export keyword came out of the blue

Hey there, I've encountered an error while setting up the bottom material tab navigator. I've looked into it extensively but can't pinpoint the exact cause of the issue.

https://i.sstatic.net/TtGIf.png

import React, { Component } from 'react'
import{StyleSheet,Text,View}from 'react-native'
import Profile from './Profile'
import Cart from './Cart'
import{createBottomTabNavigator,createAppContainer} from 'react-navigation';
import{createMaterialBottomTabNavigator} from 'react-navigation-material-bottom-tabs';
import{Icon} from 'react-native-elements';
import Home from './Home';

 class App extends Component{
  render(){
    return(
      <View>
      </View>
    )
  }
}

const TabNavigator=createMaterialBottomTabNavigator(
  {
    Home:{screen:Home,
      navigationOptions:{
        tabBarLabel:'Home',
        activeColor:'#ff0000',
        inactivecolor:'#000000',
        barStyle:{backgroundcolor:'#67ba56'},
        tabBarIcon:()=>(
          <View>
            <Icon name= {'home'}    size={25} style={{color:'#ff0000'}}      />
          </View>
        )
      }
    },
    Profile:{screen:Profile,
      navigationOptions:{
        tabBarLabel:'Profile',
        activeColor:'#ff0000',
        inactivecolor:'#000000',
        barStyle:{backgroundcolor:'#67ba56'},
        tabBarIcon:()=>(
          <View>
            <Icon name= {'profile'}    size={25} style={{color:'#ff0000'}}      />
          </View>
        )
      }
  },
  Cart:{screen:Cart,
    navigationOptions:{
      tabBarLabel:'Cart',
      activeColor:'#ff0000',
      inactivecolor:'#000000',
      barStyle:{backgroundcolor:'#67ba56'},
      tabBarIcon:()=>(
        <View>
          <Icon name= {'add-shopping-cart'}    size={25} style={{color:'#ff0000'}}      />
        </View>
      )
    }
}
  }
),
export default createAppContainer(TabNavigator)

I've made sure to install all necessary dependencies and reviewed the export statement, but it still doesn't seem to be functioning properly. Do you think reinstalling the dependencies would solve the issue?

Answer №1

There is an unnecessary comma that needs to be replaced with a semicolon Also, please delete the closing parenthesis at the end of createMaterialBottomTabNavigator

Replace it with
);

export default createAppContainer(TabNavigator);

Similar questions

If you have not found the answer to your question or you are interested in this topic, then look at other similar questions below or use the search

JavaScript Regular Expressions: Naming Conventions

While many of us are familiar with naming conventions in R, regular expressions remain uncharted territory for me and the most dreaded aspect of my programming endeavors. As I dive back into JavaScript, I am grappling with creating precise RegExp to valida ...

Reactjs: Tips for precisely cropping an image to a specific aspect ratio using client-side techniques

Looking to crop an image with a minimalist approach to achieve a specific aspect ratio. For instance, if we have an image sized at 3038 x 2014 px, and desire a 1:2 aspect ratio, we would crop it to 3021 x 2014 px. The crop would be made from the center of ...

What are the best practices for integrating RxJS into Angular 2 projects?

How can I write code like this in Angular 2? var closeButton1 = document.querySelector('.close1'); var close1ClickStream = Rx.Observable.fromEvent(closeButton1, 'click'); I have attempted various methods to incorporate this into an An ...

Tips for sending a JavaScript variable through an AJAX URL

I currently have a variable defined like this: var myip; I need to include this variable in the following URL: $.ajax('http://api.ipstack.com/**[myip]**?access_key=mykey') Manually replacing [myip] with my IP address works fine, but I am loo ...

Adjust the dimensions of the viewport in WebdriverJS

Is there a way to launch the Chrome browser with a specific viewport size, like 800x600? I have tried the following code: var width = 800; var height = 600; driver.manage().window().setSize(width, height); However, when running window.screen.width in the ...

Can debugging AngularJS in MVC be done in Visual Studio 2013 Ultimate?

Annoyance: When working on my application, I often encounter bugs that require debugging. I find myself opening Chrome, then Dev Tools, and using its less than ideal debug tools to troubleshoot the issue. Desire: It would be fantastic if I could simply se ...

Utilizing React's multiple states for enhancing click event functionality

Here's the scenario: I am currently developing a Simon-Says game app using React Native. In this game, the user is shown a sequence of flashing buttons and must press them in the correct order. My main concern is figuring out how to utilize two diffe ...

Session-based Authorization

I'm completely new to working with express.js, and I've been facing an issue while trying to create a session-cookie after logging in. Even though I can initiate the session and successfully log in, the session data doesn't carry over to the ...

nodejs callbacks and their return values

Hey guys, I'm having trouble resolving an issue with a JavaScript callback return. Here's the function in question: //Function to get user's contact list function get_contact_list(data) { //Retrieve user ID based on ...

Displaying an element outside with reduced opacity using fabric js and controls placed above overlay

The property controlsAboveOverlay in Fabric.js is a boolean that, when set to true, will display the controls (borders, corners, etc.) of an object above the overlay image. The overlay image is an image that can be placed on top of the canvas. Currently, ...

How to add data to Laravel after successful ajax request

I have a div containing bids: @foreach($bids as $b) <div class="bids notice notice-lg"> <strong>{{$b->user->name}}</strong> is offering <span style="font-size: 18px" class="label label-success">{{$b->bid}} €</span ...

What is the best way to create a non-reactive value in Vue.js?

In my Vue.js app, I am facing an issue where an array value is becoming reactive even though I want it to remain un-reactive. The array should only be updated when a specific "refresh" action is completed. However, every time a new value is assigned to the ...

Angular view fails to update after form submission when using ngDialog to change the scope

After starting my Angular journey, I decided to challenge myself by creating a comprehensive todo app for educational purposes. I seem to be missing something pretty basic, although I can't quite put my finger on it. It seems like there might be an is ...

Purge ajax result upon completion of server operation

I'm currently working with an AJAX code that takes input from a radio form. The server code, upon satisfying a specific if() condition, redirects to another page on my site, such as dashboard.php! However, upon redirection, I am still seeing the rad ...

implement django self,pk post-save success function

It might seem unconventional, but I'm attempting to utilize a primary key (pk) in a success function to generate a href for loading. The pk will be new and generated by the save() method. What I would like to know is how to send the self.pk pack to t ...

Issue with getStaticProps in Next.js component not functioning as expected

I have a component that I imported and used on a page, but I'm encountering the error - TypeError: Cannot read property 'labels' of undefined. The issue seems to be with how I pass the data and options to ChartCard because they are underline ...

Extract the links from the database using AngularJS

Currently, I am utilizing Laravel 5 for the backend and Angular.js for the frontend. The application operates solely through ajax requests. In my view, I have static links that are always visible on any page. Here is an example of how they are displayed: ...

Access the values in multiple dynamic inputs using ReactJS

I have successfully implemented dynamic inputs, but now I am facing an issue with retrieving the values of each input as there are multiple inputs. How can I go about solving this problem? You can view the code on this jsfiddle. perRow() { return ...

The SkyBox in THREE.js is a visually stunning feature that

I've been trying to create a SkyBox in THREE.js, following some tips I found online. However, none of the methods seem to work for me. I have double-checked the file paths and image paths, so I'm not sure what's causing the skybox not to app ...

The success callback is not triggered when making a JSONP request

I have a specific URL that returns JSON data when accessed through a browser or REST client. However, I am having trouble making the request using jQuery in my express server running over HTTPS. Despite receiving a successful response in the network debug ...