Type annotations can only be used in TypeScript files

I have created a new react-native project using:

npx react-native init

But on App.js there is an error here:

const App: () => React$Node = () => {
  return (
...
)}

There is a red underline in "() => React$Node"

And the error is:

Type annotations can only be used in TypeScript files

I know that this can be fixed by just using "const App = () => { ", but I remember that I have created some other projects before that would not have this error when created. I noticed that this started to happen only after I created a project with template typescript. Now every project I create start like this, and I don’t think this is the only thing on the code that is different, because I’m finding a lot of odd errors that wouldn’t happen before. The project now will only render right if I use typescript, even if I change this line.

My question is: How can I go back to when the project would not require typescript to work??

366 thoughts on “Type annotations can only be used in TypeScript files”

  1. Hey there would you mind stating which blog platform you’re working with?

    I’m looking to start my own blog in the near future but
    I’m having a tough time deciding between BlogEngine/Wordpress/B2evolution and Drupal.
    The reason I ask is because your design and style seems different then most blogs and I’m looking for something unique.
    P.S My apologies for being off-topic but I had to ask!

    Reply
  2. I will right away seize your rss feed as I can not in finding your email subscription hyperlink or e-newsletter service.

    Do you have any? Please let me know in order that I may just subscribe.
    Thanks.

    Reply
  3. Hi, I do think this is a great site. I stumbledupon it 😉
    I will return yet again since i have saved as a favorite it.
    Money and freedom is the best way to change, may you be rich and continue to help others.

    Reply
  4. I’llright awa taske old of your rss feesd ass I cann nnot find your emaill subscription lijk oor newslettewr service.

    Do you hae any? Please llet mme realize so that I culd subscribe.
    Thanks.

    Reply
  5. It’s appropriate time to make some plans for the future and it is
    time to be happy. I’ve read this post and if I could I desire to
    suggest you few interesting things or tips.
    Maybe you could write next articles referring to this article.
    I wish to read more things about it!

    Reply
  6. It is perfect time to make some plans for the long run and it is time to be
    happy. I have learn this submit and if I
    may I desire to suggest you some interesting things or suggestions.
    Perhaps you can write next articles relating to this article.
    I desire to learn more issues approximately it!

    Reply
  7. It is perfect time to make a few plans for the long
    run and it’s time to be happy. I have read this publish and if I may I desire to suggest you some attention-grabbing things or
    advice. Perhaps you could write next articles relating to
    this article. I wish to learn more issues approximately it!

    Reply
  8. Hi there! Someone in my Facebook group shared this website with
    us so I came to look it over. I’m definitely loving
    the information. I’m bookmarking and will be tweeting
    this to my followers! Terrific blog and fantastic style and design.

    Reply
  9. It’s appropriate time to make a few plans for the future and it is time to be happy.

    I’ve read this put up and if I may I desire to counsel you few fascinating
    issues or tips. Perhaps you can write next articles regarding this article.
    I wish to read even more things approximately it!

    Reply
  10. It is perfect time to make some plans for the future and it’s time to be
    happy. I have read this put up and if I could I wish to suggest you some fascinating things or suggestions.
    Maybe you can write subsequent articles referring to this article.
    I wish to learn even more things approximately it!

    Reply
  11. Pingback: slimfast keto
  12. I will right away grab your rss as I can not in finding your email subscription link or
    e-newsletter service. Do you have any? Please let me recognize in order
    that I may subscribe. Thanks.

    Reply
  13. Hey there! I’ve been reading your weblog for a long time now and finally got
    the bravery to go ahead and give you a shout out from Austin Tx!
    Just wanted to mention keep up the fantastic job!

    Reply
  14. I will immediately take hold of your rss as I can’t in finding your
    email subscription link or newsletter service. Do you have any?
    Please permit me recognize in order that I may just subscribe.
    Thanks.

    Reply
  15. I have been browsing online more than three hours these days,
    yet I never found any interesting article like yours.
    It’s pretty worth enough for me. Personally, if all
    website owners and bloggers made just right content material as
    you did, the net will likely be a lot more helpful than ever before.

    Reply
  16. I simply could not go away your site prior to suggesting that I actually loved the standard information a person provide in your guests? Is going to be back continuously in order to check up on new posts.

    Reply
  17. You actually make it seem so easy with your presentation but
    I find this topic to be really something which I think I would never
    understand. It seems too complicated and extremely broad for
    me. I am looking forward for your next post, I’ll try to get the hang of
    it!

    Reply
  18. Good web site! I really love how it is simple on my eyes and the data are well written. I’m wondering how I could be notified when a new post has been made. I have subscribed to your feed which must do the trick! Have a nice day!

    Reply
  19. Pingback: viagra canada
  20. You really make it appear so easy together with your presentation but I find this topic to be really one thing which I think I would never understand. It seems too complex and very wide for me. I’m taking a look forward for your subsequent submit, I will attempt to get the hold of it!

    Reply
  21. Pingback: viagra buy
  22. It’s the best time to make some plans for the future and it’s time to be happy.
    I have read this post and if I could I wish to suggest you some interesting things or
    tips. Maybe you can write next articles referring to this article.
    I desire to read more things about it!

    Reply
  23. It is appropriate time to make some plans for the future and it is
    time to be happy. I have read this post and if I could I desire to suggest you some interesting things or suggestions.

    Perhaps you could write next articles referring to this article.

    I wish to read more things about it!

    Reply
  24. Pingback: cialis by mail
  25. Pingback: liquid cialis
  26. Pingback: cheapest cialis uk
  27. Pingback: buy cialis tablets
  28. Pingback: buy cialis 20mg
  29. Pingback: viagra sample
  30. Pingback: generic viagra buy
  31. I’ll right away grasp your rss feed as I can not in finding your
    email subscription hyperlink or newsletter service.
    Do you have any? Kindly allow me recognise so that I may just
    subscribe. Thanks.

    Reply
  32. Pingback: sildenafil online
  33. Pingback: drugs like cialis
  34. Pingback: viagra 100mg
  35. Pingback: best viagra in usa
  36. Hey there just wanted to give you a quick heads up and let you know a few of the images aren’t loading properly.
    I’m not sure why but I think its a linking issue.

    I’ve tried it in two different web browsers and both show the same outcome.

    Reply
  37. Pingback: get cialis
  38. Pingback: discount cialis
  39. Pingback: viagra samples
  40. Pingback: viagra cost
  41. Hello, Neat post. There is a problem together with your web site in web explorer, could check this? IE nonetheless is the market chief and a good component of other people will omit your wonderful writing because of this problem.|

    Reply
  42. Pingback: buy viagra
  43. Pingback: viagra pills
  44. Pingback: homemade viagra
  45. Pingback: snorting viagra
  46. Pingback: buy viagra cheap
  47. Pingback: viagra meaning
  48. Pingback: viagra men
  49. Pingback: cialis vs viagra
  50. Pingback: levitra vs viagra
  51. Pingback: sildenafil goodrx
  52. Pingback: sildenafil
  53. Pingback: cost of viagra
  54. Pingback: cheap viagra
  55. Pingback: viagra usa
  56. Pingback: viagra prices
  57. Every weekend i used to pay a visit this site, for the reason that i wish for enjoyment, for the reason that
    this this web site conations actually pleasant funny material too.

    Reply
  58. Do you have a spam problem on this site; I also am a blogger,
    and I was wondering your situation; many of us have developed
    some nice practices and we are looking to swap methods with others, why not shoot me an e-mail
    if interested.

    Reply
  59. Thank you for the good writeup. It actually was a leisure account it.
    Glance complex to more brought agreeable from you! However, how can we keep in touch?

    Reply
  60. Thank you for another informative web site. The place else may just I am getting that
    kind of info written in such an ideal way?

    I have a undertaking that I’m simply now operating on, and I have been at the look out for
    such info.

    Reply
  61. Woah! I’m really enjoying the template/theme of this website.
    It’s simple, yet effective. A lot of times it’s very hard to
    get that “perfect balance” between usability and appearance.

    I must say you have done a amazing job with this.

    In addition, the blog loads super fast for me on Opera.
    Excellent Blog!

    Reply
  62. Howdy! I know this is kinda off topic but I’d figured I’d
    ask. Would you be interested in exchanging links or maybe
    guest writing a blog post or vice-versa? My blog goes over a lot of the same subjects as yours and I think we could greatly
    benefit from each other. If you’re interested feel free
    to shoot me an e-mail. I look forward to hearing from you!
    Superb blog by the way!

    Reply
  63. First off I would like to say awesome blog! I had a quick question which I’d like to ask if you do not mind.
    I was interested to find out how you center yourself and clear your mind before writing.

    I have had a tough time clearing my thoughts in getting my
    thoughts out. I truly do take pleasure in writing however
    it just seems like the first 10 to 15 minutes tend to
    be lost simply just trying to figure out how to
    begin. Any suggestions or tips? Thank you!

    Reply
  64. Hello! I know this is somewhat off topic but I was wondering which blog platform are
    you using for this site? I’m getting tired of WordPress because I’ve
    had issues with hackers and I’m looking at alternatives for another platform.
    I would be fantastic if you could point me
    in the direction of a good platform.

    Reply
  65. I was wondering if you ever considered changing the page layout of your website?
    Its very well written; I love what youve got to say.

    But maybe you could a little more in the way of content
    so people could connect with it better. Youve got an awful lot of
    text for only having one or 2 images. Maybe you could space it out better?

    Reply
  66. Hi, There’s no doubt that your site might be having web
    browser compatibility problems. When I take a look at your blog
    in Safari, it looks fine however, when opening in IE, it’s got some overlapping issues.
    I just wanted to provide you with a quick heads up! Aside from
    that, great blog!

    Reply
  67. Do you have a spam problem on this site; I also am a
    blogger, and I was curious about your situation;
    many of us have developed some nice methods and we are looking to trade methods with other folks, why
    not shoot me an email if interested.

    Reply