Use ReScript with Svelte

Hi, Is there a way to use ReScript inside svelte?

example with typescript:

<script lang="ts">
   let count: number  = 0;
</script>
<span>
  {name}
</span>

it will be great if we can use ReScript as well:

<script lang="res">
   let count: int  = 0;
</script>
<span>
  {name}
</span>
2 Likes

The easiest option may be to write all your logic inside Rescript modules and import them for use inside a svelte component.

3 Likes

found this svelte-with-rescript.

How is it going using svelte plus Rescript?