Skip to content

Commit fce3db5

Browse files
author
gvweshg
committed
make it much shorter
make it much shorter
1 parent a85606e commit fce3db5

File tree

1 file changed

+1
-5
lines changed

1 file changed

+1
-5
lines changed

README.md

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -244,11 +244,7 @@ The problem with this approach that if we need to add another prop in the future
244244

245245
## propTypes in TypeScript
246246

247-
Since TypeScript is supporting and embracing Types in compile-time some may think that there's no need for injecting the propTypes
248-
to do the run-time type checking. While that's true in some cases (like developing an app that is totally being used by TypeScript developers),
249-
injecting the propType is still recommened and relevant in the libraries that is willing to be used
250-
by JavaScript developers because they won't gain the benefits of the type-system and will likely break things such as: passing props with
251-
not suitable types.
247+
`propTypes` may be unnecessary with TypeScript, especially when building React + Typescript **apps**, but they are still relevant when writing **libraries** which may be used by developers working in Javascript.
252248

253249
```ts
254250
interface IMyComponentProps {

0 commit comments

Comments
 (0)