How to fix Parsing error: Unexpected token?

858    Asked by RoseKnox in Data Science , Asked on Apr 12, 2021

I am trying to change my text color but I keep on getting Parsing error: Unexpected token as an error but don't know why can someone point out where my error is and how I would be able to fix that?

This is the code:

import React from 'react';
import react, { Component } from 'react'
import { Plateform, StyleSheet, view,text } from 'react-native';
**Here is where I am trying to change the text color everything seems to be in place but I keep on getting that unexpected token error?**
function Header() {
  return (

    

    

      

        

        

        

        

        

About

        

Cars

        

Contact

        

Search

      

      

      

  );
}
export default Header extends Component;
./src/components/header.js
Error which I am getting is:
  Line 10:78:  Parsing error: Unexpected token
     return (

       

    

                                                                                   ^

         

          

           

Answered by Rose Knox

You didn't close the Text tag, that the reason you are getting parsing error unexpected token error:

 React Native Font example 
                                              ^
And you also should close the tag

Hope my answer works well!



Your Answer

Interviews

Parent Categories