Svelte ❤️ ReScript
This project is to demonstrate how to build Svelte apps using Rescript
Get started
- Clone the project
- Install the dependencies...
$ npm i
- Start the Svelte dev server and ReScript build system
$ npm run dev # to run the Svelte dev server
$ npm run re:watch # to run the ReScript Build System
How it works
- The code written in ReScript is compiled to javascript file (by ReScript build system) which is imported in the *.svelte file.
- So, in Svelte file we have html, css, and javascript code to subscribe to Svelte store (The store is in Rescript file)
- All the logic like calling external API, updating the store and other logic can be written in ReScript.
- Note: You can't write ReScript in *.svelte file itself.

See also: [6020]: https://github.com/sveltejs/svelte/issues/6020