Skip to content

Repository files navigation

🍜 ⚡ miso-fetch

image

Usage

----------------------------------------------------------------------------dataAction=FetchGitHub
| SetGitHub (ResponseGitHub)
| ErrorHandler (ResponseMisoString)
----------------------------------------------------------------------------app::AppModelAction
app = component emptyModel updateModel viewModel
----------------------------------------------------------------------------updateModel::Action->EffectROOTModelAction
updateModel =\caseFetchGitHub->
getJSON "https://api.github.com"[]SetGitHubErrorHandlerSetGitHubResponse {..} ->
info ?= body
ErrorHandlerResponse {..} ->
io_ (consoleError body)
----------------------------------------------------------------------------

Build and run

Install Nix Flakes, then:

nix develop .#wasm
make
make serve

About

⚡ An example demonstrating AJAX requests in miso

Topics

Resources

Stars

2 stars

Watchers

1 watching

Forks

Releases

Sponsor this project

Packages

Contributors

Languages