re: Notes on TypeScript: Inferring React PropTypes VIEW POST

TOP OF THREAD FULL DISCUSSION
re: Thanks for the article. I've tried this solution, but stuck with an error: Type 'string | null | undefined' is not assignable to type 'string | ...
 

Thanks for the question. Could you build a codesandbox example, so we can see the complete example and then try to fix it from there?

 

Sure, here it is codesandbox.io/s/weathered-snowfla...
Looks like If disable strict mode in tsconfig.json it works fine.

Excellent, thanks!
Will try it out and provide some feedback.

code of conduct - report abuse