Popularity
1.3
Declining
Activity
0.0
Stable
5
1
0

Monthly Downloads: 8
Programming language: Haskell
License: BSD 3-clause "New" or "Revised" License
Tags: Web     Miso    
Latest version: v0.1.0.1

miso-action-logger alternatives and similar packages

Based on the "miso" category.
Alternatively, view miso-action-logger alternatives based on common mentions on social networks and blogs.

Do you think we are missing an alternative of miso-action-logger or a related project?

Add another 'miso' Package

README

MisoActionLogger Hackage

State transition logger for Miso

MisoActionLogger helps you quickly develop and debug your Miso apps by wrapping your update function to log every evaluated action and show you the app state before and after.

We marshal your state tree to JS Objects to benefit from the rich object introspection features of modern browser consoles. This imposes a ToJSON constraint on your models.

Installation

Option 1: use nix-prefetch-git to generate arguments for fetchFromGitHub. You'll end up with somthing like this:

miso-action-logger = ghcjs.callCabal2nix "miso-action-logger" (pkgs.fetchFromGitHub {
  owner = "Lermex";
  repo = "miso-action-logger";
  sha256 = "1q6bpckz355paxcs10223fnl1d3lnxz2vcgj8l7nqvclicp04hsb";
  rev = "917af7edc33e86b1510ebf2bc8e1b1bb9f03c164";
}) { miso = miso-ghcjs; }

Option 2: if your nixpkgs is recent enough, you can use pkgs.callHackageDirect to fetch directly from Hackage.

In both cases you will then need to add the package to your build arguments like this:

ghcjs.callCabal2nix "client" ./. {
  miso = miso-ghcjs;
  miso-action-logger = miso-action-logger;
}

Usage

module Main where

import MisoActionLogger

-- ...

main :: IO ()
main = do
  let model = Model -- ...
  startApp App {model = model, ..}
  where
    initialAction = NoOp 
    update = defaultActionLogger updateModel -- <-- wrap your update function 
    view   = Routing.view            
    events = defaultEvents        
    subs   = [ uriSub HandleURI ]                   
    mountPoint = Nothing