Git Product home page Git Product logo

Comments (10)

doxxx avatar doxxx commented on August 18, 2024 3

@dkozickis After doing some reading, it would seem that one of the other implications is that Babel 7 doesn't actually do any type-checking of Typescript code, it just transpiles it down to Javascript. If you want type-checking, you still have to run tsc.

from create-react-app-typescript.

doxxx avatar doxxx commented on August 18, 2024 2

@hassankhan https://blogs.msdn.microsoft.com/typescript/2018/08/27/typescript-and-babel-7/

from create-react-app-typescript.

 avatar commented on August 18, 2024

I believe the correct CRA version is 2.1. Also one more difference to add could be that in CRA 2.1 you can't use <Type>expression to cast, only expression as Type. Which is a super minor thing as you can't use it in TSX anyway so it only applies to TS files which I believe are usually in a minority in React based TS projects.

from create-react-app-typescript.

hassankhan avatar hassankhan commented on August 18, 2024

Thanks @tomashubelbauermicrosoft, I've updated the table above. Do you think its worth mentioning the differences from here too?

from create-react-app-typescript.

 avatar commented on August 18, 2024

Decorators won' bet supported until CRA 2.1.1: facebook/create-react-app#5642

EDIT: Now fixed and released as CRA 2.1.1.

from create-react-app-typescript.

doxxx avatar doxxx commented on August 18, 2024

What are the implications of using Babel vs tsc for transpilation?

from create-react-app-typescript.

dkozickis avatar dkozickis commented on August 18, 2024

@doxxx Namespaces and casting

from create-react-app-typescript.

danielkcz avatar danielkcz commented on August 18, 2024

I think we should include babel-loader for typescript files as well because of the super handy babel-plugin-macros. Or perhaps do it opt-in somehow.

from create-react-app-typescript.

shobhitg avatar shobhitg commented on August 18, 2024

Just tried out CRA 2.1.0.
Looks like linting is based on eslint. And there is too much mismatch between vscode dev environment and linting errors. There is no eslint config file created to customize anything. And I felt documentation was lacking wrt linting in general.

CRA-TS does it perfectly for me. If the console shows an error, vscode shows it too.

from create-react-app-typescript.

hassankhan avatar hassankhan commented on August 18, 2024

@doxxx I thought I'd read that somewhere too, but can't seem to find any links 😕. If you could post one, that would be awesome 👍

from create-react-app-typescript.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.