Hi, I’m an absolute newbie to ReScript, and have been grappling with this problem for hours and finally posting this in the forum. Pardon me if this forum is not intended for question-and-answer type of postings.
I want to have an array that contains multiple types of data, like let arr = [1, (“hello”,1), “world”]. I thought I could achieve this by using variant, like
let SuperType =
| FirstType(int)
| SecondType(string)
and use it directly in the array,
type something = {
types: array(SuperType)
}
but this does not work! What is the correct ReScript way doing this?
Last but not least, I’d like to ask your opinions on what would be the wise way to tackle problems I encounter in the course of developing with ReScript. Should I peruse the ReScript docs over and over to do it somehow in my own way | post issues in Github | ask in stackoverflow?