Flow version: 0.114
This doesn't quite look like the issue reported in https://github.com/facebook/flow/issues/6810
Ceate a generic type T to represent a list item in a component while additionally using T as an argument for a callback
`T` [1] is incompatible with `T` [2]
cc: @dsainati1
This looks like a bug with generics. We are planning a big overhaul of how generic typing works in the first half of 2020, so that should address this.
Interestingly, defining handleSelectItem as a regular function (rather than a class property arrow fn assignment) does not exhibit the bug.
https://flow.org/try/#0PTAEAEDMBsHsHcBQBLAtgB1gJwC6gFSgCGAzqAEoCmRAxnpFrKqAERbV0sDciiOAnukqgACo3QkAPABUAfKAC8oAN6JQoZDkqoSALlDSA2gF0ANGtAlK0SnUoATAJJbU+6eYC+PRJQAemXFB7SkgiAFdoPBpoUjIAMWRIyiwZeT8tADt7MipaHAA6AGEmTAzKDJxJCzFYCVTEeVV1dHE9UVbUnnUACyIsmwBla1scZ20ACk1tNwBKFQt1Cw9edXYs5PG5pvVQGlgMkjx9wuhkGgBrRVBNxUaFnZxu5BJ83v7KIZs6MdRxx+f8i1ai8rF8tE4XDMujtlosdqB2DgwlgMqAMhFoNDlssgA
Most helpful comment
This looks like a bug with generics. We are planning a big overhaul of how generic typing works in the first half of 2020, so that should address this.