simone
March 1, 2021, 11:12pm
1
Update: I’ve posted the solution in first answer
Hello, I’m playing around with ReScript, so totally newbie here.
I have this component where the children render are (optionally) handled by the parent, via a render prop function:
https://rescript-lang.org/try?code=C4TwDgpgBAThB2ATCMAq5oF4oAoCW8wANFAGYA2A9gIbACUUmAfFAEoTUDGwAdBORAC2CYAChRAAThdenSoLCV4I0QOBRB1ANZZcAP0S1qALijUYMaiAA8FGsCaYA2gF0Se4Hk5aGzKAG9RKChrRDwANygmIOCAgCF+XgBBCyseTTAAdTxgAAsASSQIAA8cQ2BqEnwScOpyAFcIXxZA2NiAegAqAGcAdxzOXKhPbwCYtoAfWARkNAwcUmayfCLimrrGunHYqYA5JSwWUIioHRBMfwTyXkLeYEoAZWAYAgBzFeRiugBfFvYZHh2Wg4WoNJrfELtMLhaJtYLfTrtbZtEZaHB6AifTB4dygxqmIH0bbfOgAWiY-24PHMlhA3xi1ihEWi9KAA
The question is, how do I handle cases where ~tick is not provided?
Plus, is this a “matchable” type?
type renderTick = (int, float) => React.element
Thanks and apologize if the question sounds silly.