Safe Haskell | None |
---|---|
Language | Haskell2010 |
- data Command = SetPropertyCommand Property JSVal
- data Action
- class AsAction r where
- data Plan = Plan {
- _component :: ReactComponent
- _onRender :: Callback (JSVal -> IO JSVal)
- _onInputRef :: Callback (JSVal -> IO ())
- _onKeyDown :: Callback (JSVal -> IO ())
- class HasPlan c where
- mkPlan :: Frame Model Plan -> F (Maker Action) Plan
- data Model = Model {
- _uid :: JSString
- _inputRef :: JSVal
- _placeholder :: JSString
- _className :: JSString
- class HasModel c where
- type Design = Design Model Plan
- type Frame = Frame Model Plan
- type SuperModel = SuperModel Model Plan
- type Widget = Widget Command Action Model Plan
- widget :: Widget Command Action Model Plan
- window :: WindowT (Design Model Plan) (ReactMlT Identity) ()
- gadget :: GadgetT Action (SuperModel Model Plan) Identity (DList Command)
- whenKeyDown :: JSVal -> MaybeT IO (Maybe JSString, JSVal)
Documentation
Plan | |
|
Model | |
|
type SuperModel = SuperModel Model Plan Source #
window :: WindowT (Design Model Plan) (ReactMlT Identity) () Source #
Exposed to parent components to render this component
gadget :: GadgetT Action (SuperModel Model Plan) Identity (DList Command) Source #
State update logic. The best practice is to leave this in general Monad m (eg, not MonadIO). This allows gadget to use STM as the base monad which allows for combining concurrently with other stateful STM effects and still maintain a single source of truth.