Skip to content

A project to showcase the use of ReScript to write Svelte Apps

Notifications You must be signed in to change notification settings

sabinbajracharya/Svelte-with-Rescript

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

19 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Svelte ❤️ ReScript

This project is to demonstrate how to build Svelte apps using Rescript

Get started

  1. Clone the project
  2. Install the dependencies...
$ npm i
  1. 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.

newplot(1)

See also: [6020]: sveltejs/svelte#6020

About

A project to showcase the use of ReScript to write Svelte Apps

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published