2

Lately I've been trying to lean back-end technologies. The big picture is that after learning the back-end I wanted to learn JavaScript and later get into a JS library or Framework. I'm pretty sure that I want to lean React (easy integration with Django) but the guy in this video is claiming that React is written in TypeScript and therefore I ask myself if learning TS is the better alternative to get into React. But as a matter of fact, I've never heard someone refer to React as TypeScript since it is described as a JS library.

What is the relation here? For me this is very important since I have to structure my learning plan.

Xen_mar
  • 8,330
  • 11
  • 51
  • 74
  • 1
    react is **not** written in typescript. and that video is pretty bad and he's talking a lot of BS. – Nitzan Tomer Sep 19 '17 at 08:27
  • React is written in JavaScript. It has no relation to TypeScript. It has its own (very simple) [runtime type checking system](https://facebook.github.io/react/docs/typechecking-with-proptypes.html), but you can supplement that with either [TypeScript](https://typescriptlang.org) or [Flow](https://flow.org/). – Dan Prince Sep 19 '17 at 08:28
  • Angular, however, is written in TypeScript, so that might where some of the confusion is coming from. – Dan Prince Sep 19 '17 at 08:29

1 Answers1

5

Typescript is just a super set of javascript, it makes developing applications more maintainable as its strongly typed and adds a lot of OOP concepts that you can work with that javascript doesn't have.

While you could work with react in typescript, you could also do so in flow. Or even plain javascript, it really depends on what you're building and what you are comfortable with.

Please see this stack overflow post for a more detailed explanation on typescript.

realappie
  • 4,656
  • 2
  • 29
  • 38
  • so the way to approach React would definitely learning JS first and then getting into React? – Xen_mar Sep 19 '17 at 09:00
  • Personally I would go the extra mile and get into typescript. I haven't done much with react, as I mainly work with angular and typescript. Although typescript will increase the learning curve of the library short term, long term it will benefit you a LOT. As it will give you very useful code [IntelliSense](https://code.visualstudio.com/docs/editor/intellisense) Which flow sort of does as well (I haven't done much with flow). But pro of typescript over flow is that it's being used in angular as well now. And many nodeJS projects. But please take my advice with a grain of salt, as its biased. – realappie Sep 19 '17 at 09:03