{"id":15059407,"url":"https://github.com/laurentpayot/fsharp-fable-elmish-example","last_synced_at":"2025-04-10T05:26:08.966Z","repository":{"id":197798012,"uuid":"699350221","full_name":"laurentpayot/fsharp-fable-elmish-example","owner":"laurentpayot","description":"F# Fable Elmish example, with Preact and Vite.","archived":false,"fork":false,"pushed_at":"2024-09-19T21:24:55.000Z","size":337,"stargazers_count":12,"open_issues_count":0,"forks_count":2,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-03-24T06:51:30.982Z","etag":null,"topics":["elm","elm-architecture","elm-lang","elmish","elmish-applications","fable","fsharp","functional-programming","mvu","preact","vite"],"latest_commit_sha":null,"homepage":"","language":"F#","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/laurentpayot.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-10-02T13:13:29.000Z","updated_at":"2025-01-28T20:00:15.000Z","dependencies_parsed_at":"2023-11-17T12:30:29.380Z","dependency_job_id":"bbd8903b-9bfa-4ad4-8d87-a3c30c3e4494","html_url":"https://github.com/laurentpayot/fsharp-fable-elmish-example","commit_stats":null,"previous_names":["laurentpayot/fsharp-counter-web-app","laurentpayot/fsharp-fable-elmish-example"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/laurentpayot%2Ffsharp-fable-elmish-example","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/laurentpayot%2Ffsharp-fable-elmish-example/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/laurentpayot%2Ffsharp-fable-elmish-example/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/laurentpayot%2Ffsharp-fable-elmish-example/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/laurentpayot","download_url":"https://codeload.github.com/laurentpayot/fsharp-fable-elmish-example/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248162145,"owners_count":21057702,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["elm","elm-architecture","elm-lang","elmish","elmish-applications","fable","fsharp","functional-programming","mvu","preact","vite"],"created_at":"2024-09-24T22:43:11.726Z","updated_at":"2025-04-10T05:26:08.949Z","avatar_url":"https://github.com/laurentpayot.png","language":"F#","funding_links":[],"categories":[],"sub_categories":[],"readme":"# F# Fable Elmish example\n\nThe goal of this example is to show how to get typical [Elm](https://elm-lang.org/) features (see below) in [F#](https://fsharp.org/). We use [Fable](https://fable.io/) to transpile F# to JavaScript and [Elmish](https://elmish.github.io/elmish/) to get [The Elm Architecture](https://guide.elm-lang.org/architecture/) (TEA), also known as the Model View Update (MVU) pattern.\n\nFor views we use [Feliz](https://zaid-ajaj.github.io/Feliz/) that uses [React](https://react.dev/) under the hood. In this example React is seamlessly replaced by [Preact](https://preactjs.com/) to get performances [similar to Elm](https://krausest.github.io/js-framework-benchmark/2022/table_chrome_102.0.5005.61.html), both in term of speed and bundle size.\n\n## Featuring\n\n- [x] Startup flags\n- [x] Getting a random number\n- [x] Routing\n- [x] Subscription via a JavaScript custom event\n- [x] Foreign Function Interface (FFI) using synchronous and asynchronous functions imported from JavaScript\n- [x] JSON decoding\n- [x] Keyed list\n- [x] Unit tests\n- [x] Hot Module Replacement (HMR)\n- [x] Debugger (via Redux DevTools)\n\n## Prerequisites\n\nTo run this example app on your local machine, you will need:\n\n- [.NET 8 SDK](https://dotnet.microsoft.com/en-us/download)\n- [pnpm](https://pnpm.io/installation)\n- [Node.js](https://nodejs.org/) (can be installed via pnpm with `pnpm env use --global latest`)\n- [Redux DevTools](https://github.com/reduxjs/redux-devtools) browser extension for the debugger, and maybe [Preact DevTools](https://preactjs.github.io/preact-devtools/) if you wish to inspect the rendering itself.\n- [Ionide](https://ionide.io/) plugin for your IDE is highly recommended.\n\n## Usage\n\n- `pnpm i` to install Node.js dependencies as well as F# dependencies.\n- `pnpm start` to start the Vite development server with automatic refresh on http://localhost:5000.\n- `pnpm build` to build the bundle, then `pnpm serve` to serve it as a single page application on http://localhost:5000.\n- `pnpm test` to run unit tests.\n- `pnpm test:watch` to run unit tests in watch mode.\n\nIf you get an error like `ENOSPC: System limit for number of file watchers reached`, run `pnpm watchers-fix` to increase the number of watchers on your system. If you want this increase to be permanent, see [this answer on StackOverflow](https://stackoverflow.com/a/55543310/2675387).\n\n## License\n\n[MIT](https://github.com/laurentpayot/fsharp-fable-elmish-example/blob/main/LICENSE)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flaurentpayot%2Ffsharp-fable-elmish-example","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flaurentpayot%2Ffsharp-fable-elmish-example","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flaurentpayot%2Ffsharp-fable-elmish-example/lists"}