mirror of
https://github.com/ryan-haskell/elm-spa.git
synced 2024-11-22 03:12:01 +03:00
commit
353552d9f1
@ -175,7 +175,10 @@ port load : (Json.Value -> msg) -> Sub msg
|
|||||||
Above, we've created a `port module` that defines our `save` and `load` ports. Next, we'll describe the data we want to store, as well as how to convert it to and from JSON:
|
Above, we've created a `port module` that defines our `save` and `load` ports. Next, we'll describe the data we want to store, as well as how to convert it to and from JSON:
|
||||||
|
|
||||||
```elm
|
```elm
|
||||||
port module Storage exposing (..)
|
port module Storage exposing
|
||||||
|
( Storage, fromJson, onChange
|
||||||
|
, increment, decrement
|
||||||
|
)
|
||||||
|
|
||||||
import Json.Encode as Encode
|
import Json.Encode as Encode
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user