DEV Community

Discussion on: Reason(React) Best Practices - Part 1

Collapse
 
idkjs profile image
Alain
external applesToFruits: apples => fruits = "%identity";
Enter fullscreen mode Exit fullscreen mode

throws: Error: Unbound type constructor fruits.

Works if you add type fruits = Js.Json.t; to file but not sure if this is what you were going for.

Collapse
 
fhammerschmidt profile image
Florian Hammerschmidt

You 're right. I forgot to add a type fruits = Js.Json.t;definition somewhere above, fixed it now. I updated the post section with some ReasonML Try examples, so that one easily can verify it for themselves.