O
O
Ostic2019-05-15 09:43:35
typescript
Ostic, 2019-05-15 09:43:35

What are the challenges of statically typing React + Redux apps?

Hello.
I am learning React+Redux+Styled-components. For educational purposes, I set up Webpack myself.
The typing is dynamic. In general, I achieved some success in studying and thought about using static typing: flow, typescript (to a lesser extent kotlin).
Given that I set up the collector myself, I understand how many and what plugins I installed for Babel, but in the case of TS, for example, as far as I understand, TS does not allow any plugins and all the conveniences of transformations, decorators, etc. can not be used? There is such a feature as @babel/preset-typescript, but I don’t fully understand how it works - you can simply use TS on top of all chips without using ts-loader, typescript, but babel does not indicate how to use it on the page of this plugin with webpack. There is a recommendation for .babelrc


allExtensions
boolean, defaults to false.
Indicates that every file should be parsed as TS or TSX (depending on the isTSX option)

I can’t conceptually understand the connection between React+Redux+Styled and TS and all the Babel features, but there is also for lodash and for styles and linters, etc.
In principle, I wrote separately on TS and didn’t experience any difficulties, but the bundle causes misunderstanding.
Looked towards Flow. It seems convenient (instead of propTypes) and integrates with Babel, as I understand it, but also some issue with redux-saga.
Who has been developing for more than a year using these technologies, please explain the situation.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
O
Ostic, 2019-05-15
@Ostic

I understand that flow integrates more organically with react + redux and babel does not disappear anywhere, but for some reason most people use ts.
Why, what are the advantages of TS over Flow?

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question