I was very happy about hearing about the new feature for typing react children, but it doesn't seem to work in combination with React.Children.map, or at least I don't know how to get it working. I have prepared two examples to illustrate that:
The first one shows that flow complains as soon as I am accessing a property of the untyped child parameter in the callback of React.Children.map. I am not sure how that should work out...
I have also tried to type the parameter, as shown in the second example I get an even stranger error including some $NonMaybeType, which I absolutely don't understand (should just not be null, as far as I see...). But in an ideal world that shouldn't be necessary at all, because flow can interfere the type, right?
Any help is appreciated 馃槂
Thanks for reporting! This is a bug. We鈥檒l have a fix out in the next version of Flow 馃槉
Most helpful comment
Thanks for reporting! This is a bug. We鈥檒l have a fix out in the next version of Flow 馃槉