Answer the question
In order to leave comments, you need to log in
What is the fundamental meaning of PropTypes/TypeScript/Flow?
Not only does this (at least PP) do not work in production, in principle I don’t understand why these extra movements are needed for the sake of the pseudo-possibility to set types. The same number is both int and double(float), and even NaN, Infinity. Among other things, there is generally frank garbage, such as CSS styles. (for flow). Why this? What's the use? Well, I indicated that my states are number, although in fact float. And entering any value there is no error. So why?
Yes, it crashes with an error if I try to make my nubmer a string somewhere in the code. Well, as a string, .toFixed(2) is just cast to 2 decimal places. Which in fact should also be perceived as a float. But then there are no errors if I do it in the render... L - logic.
Answer the question
In order to leave comments, you need to log in
You are asking a very general question, which is full of information on the Internet. For example, here is an article: https://habr.com/post/326304/ .
You do not understand what is the benefit?
- fewer development errors
- more adequate intellisense
- much easier to refactor
- use third-party code (typings can (but should not) partially replace docs)
- documentation generation https://typedoc.org/
- the ability to describe entities somewhere, and not rely on their creation in code
and much more.
Or do you not agree that there is a profit? Then argue with what you do not agree (relative to many sources on the Internet).
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question