2

So am I currently learning React Native by following app clones, such as Instagram, YouTube etc. I have just started an AirBnb clone, but upon project creation, I am running into some issues with the initial build.

The first thing I noticed was in 'App.js', the template file for the app seems to be trying to use TypeScript inside a normal .js file. (I've never really used TS, so not sure if this is possible, or I'm just being stupid...) - see this screenshot for clarity. My understanding is the .js file is trying to import a type ('Node' as seen in the image) but surely it has to be a .ts or .tsx file? I haven't changed any file extensions, this is how it came in the template when I initialized the project.

Anyone got any ideas?

2 Answers 2

3

Ah. It's not Typescript. If you look in the comments you can see @flow strict-local. I've never used it, but you can check it out here: https://flow.org/en/docs/

Sign up to request clarification or add additional context in comments.

1 Comment

ah that makes sense - although, when I hover over the red underline, it says " 'import type' declarations can only be used in TypeScript files' ". Do you reckon this is something of concern?
2

This is not typescript, it is flow. You can check the documentation here, you will find the line which is imported: https://flow.org/en/docs/react/types/

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.