Closed freewind closed 9 years ago
This is because you supplied onClick with value of type Unit, while it expects to take Function, so solution is to write () => self.props.onSelectProject(p)
, I have idea how we could improve compiler error messages, it would be implemented in 0.4.0.
Thanks, I know how to fix it
And this is really a great project, thanks for making it!
Following code will cause compilation error:
and
Project
:Error:
But if I remove the
onClick={self.props.onSelectProject(p)}
part, it will be OK.Is it because the parameter
p
is not a normal type likestring
, but a custom complex typeProject
?