2 ms·
I've been using Flow in my React Native app, but I still find PropTypes very useful, because warnings pop up in the iOS simulator whenever a prop is invalid. I
by nathan_f77 10y ago
I've been using Flow in my React Native app, but I still find PropTypes very useful, because warnings pop up in the iOS simulator whenever a prop is invalid. I think it's important to have both compile-time and run-time checks.
I recently (5 minutes ago) discovered 'flow-runtime' [1], which gives you the best of both worlds. It automatically generates PropTypes from your Flow types, as well as checking all of your other types at run-time.
[1] https://codemix.github.io/flow-runtime/ https://codemix.github.io/flow-runtime/