@@ -88,7 +88,7 @@ type API = "getint" :> Get '[JSON] Int
8888 (constDyn (BasePath "/"))
8989```
9090
91−These client functions are computed from the API and manage serialization, XhrRequest generation, and deserialization for you. `a` parameters become `Behavior t (Either String a)` values. You provide a trigger event and receive an `Event t (ReqResult a)`, with responses from the API server (which you would write with `servant-server`).
91+These client functions are computed from the API and manage serialization, XhrRequest generation, and deserialization for you. `a` parameters become `Dynamic t (Either String a)` values. You provide a trigger event and receive an `Event t (ReqResult a)`, with responses from the API server (which you would write with `servant-server`).
9292
9393```haskell
9494 -- No need to write these functions. servant-reflex creates them for you!
@@ -97,18 +97,18 @@ These client functions are computed from the API and manage serialization, XhrRe
9797 -> m (Event t (ReqResult Int)) -- ^ Consume the answer
9898
9999 sayhi :: MonadWidget t m
100− => Behavior t (Either String String)
100+ => Dynamic t (Either String String)
101101 -- ^ One input parameter - the 'name'
102− -> Behavior t [String]
102+ -> Dynamic t [String]
103103 -- ^ Another input: list of preferred greetings
104− -> Behavior t Bool
104+ -> Dynamic t Bool
105105 -- ^ Flag for capitalizing the response
106106 -> Event t ()
107107 -- ^ Trigger the XHR Request
108108 -> m (Event t (ReqResult String))
109109
110110 doubleit :: MonadWidget t m
111− => Behavior t (Either String Double)
111+ => Dynamic t (Either String Double)
112112 -> Event t ()
113113 -> m (Event t (ReqResult Double))
114114```
@@ -142,15 +142,15 @@ This example builds some input fields to enter API parameters, buttons to trigge
142142 display =<< holdDyn (Just 0) serverInts
143143
144144 elClass "div" "hello-demo" $ do
145− nameText <- (current . value) <$> textInput def
146− greetings <- (fmap words . current . value) <$> textInput def
145+ nameText <- value <$> textInput def
146+ greetings <- (fmap words . value) <$> textInput def
147147 withGusto <- checkbox def
148148 helloButton <- button "Say hi"
149149 hellos <- fmapMaybe resResult <$> sayhi nameText greetings withGusto helloButton
150150 display =<< holdDyn Nothing hellos
151151
152152 elClass "div" "demo-double" $ do
153− inputDouble <- (fmapMaybe readMaybe . current) <$> textInput def
153+ inputDouble <- (fmapMaybe readMaybe) <$> textInput def
154154 doubleButton <- button "Double it"
155155 outputDouble <- fmapMaybe resSuccess <$> doubleit inputDouble doubleButton
156156 display =<< holdDyn Nothing outputDouble