mirror of
https://github.com/ryannhg/elm-spa.git
synced 2024-11-22 09:44:55 +03:00
remain pure to keep
This commit is contained in:
parent
f565419fe7
commit
85e16ff4d3
@ -739,7 +739,7 @@ update appMsg appModel =
|
||||
}
|
||||
|
||||
( HomepageModel _, _ ) ->
|
||||
Application.pure appModel
|
||||
Application.keep appModel
|
||||
|
||||
( SignInModel model, SignInMsg msg ) ->
|
||||
Application.update
|
||||
@ -749,7 +749,7 @@ update appMsg appModel =
|
||||
}
|
||||
|
||||
( SignInModel _, _ ) ->
|
||||
Application.pure appModel
|
||||
Application.keep appModel
|
||||
|
||||
( NotFoundModel model, NotFoundMsg msg ) ->
|
||||
Application.update
|
||||
@ -759,7 +759,7 @@ update appMsg appModel =
|
||||
}
|
||||
|
||||
( NotFoundModel _, _ ) ->
|
||||
Application.pure appModel
|
||||
Application.keep appModel
|
||||
```
|
||||
|
||||
#### bundle
|
||||
|
@ -128,7 +128,7 @@ update appMsg appModel =
|
||||
}
|
||||
|
||||
( HomepageModel _, _ ) ->
|
||||
Application.pure appModel
|
||||
Application.keep appModel
|
||||
|
||||
( CounterModel model, CounterMsg msg ) ->
|
||||
Application.update
|
||||
@ -138,7 +138,7 @@ update appMsg appModel =
|
||||
}
|
||||
|
||||
( CounterModel _, _ ) ->
|
||||
Application.pure appModel
|
||||
Application.keep appModel
|
||||
|
||||
( RandomModel model, RandomMsg msg ) ->
|
||||
Application.update
|
||||
@ -148,7 +148,7 @@ update appMsg appModel =
|
||||
}
|
||||
|
||||
( RandomModel _, _ ) ->
|
||||
Application.pure appModel
|
||||
Application.keep appModel
|
||||
|
||||
( SignInModel model, SignInMsg msg ) ->
|
||||
Application.update
|
||||
@ -158,7 +158,7 @@ update appMsg appModel =
|
||||
}
|
||||
|
||||
( SignInModel _, _ ) ->
|
||||
Application.pure appModel
|
||||
Application.keep appModel
|
||||
|
||||
( NotFoundModel model, NotFoundMsg msg ) ->
|
||||
Application.update
|
||||
@ -168,7 +168,7 @@ update appMsg appModel =
|
||||
}
|
||||
|
||||
( NotFoundModel _, _ ) ->
|
||||
Application.pure appModel
|
||||
Application.keep appModel
|
||||
|
||||
|
||||
bundle :
|
||||
|
@ -3,7 +3,7 @@ module Application exposing
|
||||
, Application
|
||||
, Config
|
||||
, Context
|
||||
, init, update, pure
|
||||
, init, update, keep
|
||||
, Bundle, bundle
|
||||
)
|
||||
|
||||
@ -17,7 +17,7 @@ module Application exposing
|
||||
|
||||
@docs Context
|
||||
|
||||
@docs init, update, pure
|
||||
@docs init, update, keep
|
||||
|
||||
@docs Bundle, bundle
|
||||
|
||||
@ -425,11 +425,11 @@ update config context =
|
||||
}
|
||||
|
||||
|
||||
pure :
|
||||
keep :
|
||||
appModel
|
||||
-> Context flags route contextModel
|
||||
-> ( appModel, Cmd appMsg, Cmd contextMsg )
|
||||
pure model _ =
|
||||
keep model _ =
|
||||
( model, Cmd.none, Cmd.none )
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user