Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

185
Views
Fresh installation by npx react-native init myapp causes in problem warning

I do the terminalcommand npx react-native init myapp. Change the dir to /myapp and vs code shows me this problem warning:

Error small Error

There are some more Errors like this in the file, without doing anything.

Another Error

What did I miss?

about 4 years ago · Juan Pablo Isaza
3 answers
Answer question

0

This is not an Error. It shows the return type of the Function you ca change it to.

const App = () => {
return(
    <View>
    </View>
)

}
about 4 years ago · Juan Pablo Isaza Report

0

As discussed in the comments, this is a VSCode error only, since the application is using TypeScript annotations and the default file extension for typescript files is .ts. It could be solved by changing the file extension to .ts and possibly change occurrences of App.js in the project to App.ts.

However, this error message does not effect the runtime behavior. Since it might be desired to not change any code, we can get rid of the error message by changing the VSCode settings.

This is done by setting "javascript.validate.enable": false.

enter image description here

about 4 years ago · Juan Pablo Isaza Report

0

Try this,

import { Text, View } from 'react-native'
import React from 'react'

export default function App() {
  return (
    <View>
      <Text>hello world!</Text>
    </View>
  )
}
about 4 years ago · Juan Pablo Isaza Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!