Is this a sensible way to integrate Vue with ReScript while maintaining typechecks in the data processing?


I have a toy app to test integrating ReScript into Vue apps for (eventual) data visualization. I’ve created a working sandbox version and github repo and was wondering is this is a typical/sensible way to integrate ReScript into Vue. I just want to get a sense of if I’m using it in a way that would be counter-intuitive to an experienced user or sets me up for trouble down the road.

The thinking behind it is that passing arguments to a function in a Vue component is post-compilation and thus in my thinking not using the system to its full potential (after reading a tutorial that had a function that used this approached for demonstrative purposes I went down a rabbit hole and asked a somewhat silly question here). I’m interested in using Vue for the front-end, but processing the data in a strict way.

Essentially I’m using ReScript to compute everything and exporting the values to JS instead of the functions. It seems simple enough but I don’t have a sense for what good practice is in this system.

If anyone thinks I’m setting myself to step on a rake I’d appreciate a heads up!

Thank you!



Did you found any solution for this?