I’d like to inject values into strings when needed. In JS, I can do this:
var num = 1;
console.log(`I have ${num} car.`);
How can I do this in ReasonML without JS interop?
I’d like to inject values into strings when needed. In JS, I can do this:
var num = 1;
console.log(`I have ${num} car.`);
How can I do this in ReasonML without JS interop?
Without JS interop, you would use Printf.sprintf library. But it’s 7KB gzipped when compiling to JS