Whether typescript, is used in the react project also needs to use prop-types for format verification.

for example:
whether typescript, is used in the react project also needs to use prop-types for format verification.

Mar.04,2021

you can validate only with typescript, with prop-types only, or with a mix of both, which is not strictly restricted.
first of all, both typescript, and prop-types, are checked in development mode. There is no need to say much about typescript. For react, we refer to the official website:
clipboard.png
typescripttsprop-typesreact:

clipboard.png

clipboard.png
typescript

react

uiant-design

Affix:

clipboard.png

Alert:

clipboard.png

.

required.
PropTypes is a constraint for components to receive prop.

typescript type constraints are mainly parameter passing and return value constraints, the two things focus on different

MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1ea18b3-468a9.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1ea18b3-468a9.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?