aackerman/PropTypes

how to check which PropType given the checker function?

plantvsbirds opened this issue · 2 comments

I have a react component imported and its .propTypes available, i.e. a map of all prop names to their checker function. Now I would like to get their types.

All I can think of is to feed each checker function with some value and find out. It should work totally fine for native value. But is there a more proper way to do this?

Hi @plantvsbirds if you are using version 0.2.0 or earlier of prop-types I can try to answer. Any versions 15+ belong to the react team and I would direct you to post your question to stackoverflow and get some help from the community.