| Copyright | (c) digitally induced GmbH 2021 |
|---|---|
| Safe Haskell | None |
| Language | GHC2021 |
IHP.ServerSideComponent.Types
Description
Synopsis
- class Component state action | state -> action where
- initialState :: state
- render :: state -> Html
- action :: state -> action -> IO state
- componentDidMount :: state -> IO state
- data ComponentsController (components :: k) = ComponentsController
- data ComponentInstance state = ComponentInstance {
- state :: state
- data SSCError
- = SSCDiffError {
- errorMessage :: !Text
- | SSCActionError {
- errorMessage :: !Text
- | SSCParseError {
- errorMessage :: !Text
- = SSCDiffError {
Documentation
data ComponentsController (components :: k) Source #
Constructors
| ComponentsController |
Instances
| (Typeable components, Typeable k) => Data (ComponentsController components) Source # | |
Defined in IHP.ServerSideComponent.Types Methods gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> ComponentsController components -> c (ComponentsController components) # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c (ComponentsController components) # toConstr :: ComponentsController components -> Constr # dataTypeOf :: ComponentsController components -> DataType # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c (ComponentsController components)) # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c (ComponentsController components)) # gmapT :: (forall b. Data b => b -> b) -> ComponentsController components -> ComponentsController components # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> ComponentsController components -> r # gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> ComponentsController components -> r # gmapQ :: (forall d. Data d => d -> u) -> ComponentsController components -> [u] # gmapQi :: Int -> (forall d. Data d => d -> u) -> ComponentsController components -> u # gmapM :: Monad m => (forall d. Data d => d -> m d) -> ComponentsController components -> m (ComponentsController components) # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> ComponentsController components -> m (ComponentsController components) # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> ComponentsController components -> m (ComponentsController components) # | |
| Show (ComponentsController components) Source # | |
Defined in IHP.ServerSideComponent.Types Methods showsPrec :: Int -> ComponentsController components -> ShowS # show :: ComponentsController components -> String # showList :: [ComponentsController components] -> ShowS # | |
| Eq (ComponentsController components) Source # | |
Defined in IHP.ServerSideComponent.Types Methods (==) :: ComponentsController components -> ComponentsController components -> Bool # (/=) :: ComponentsController components -> ComponentsController components -> Bool # | |
| (Component component controller, FromJSON controller, Typeable component) => WSApp (ComponentsController component) Source # | |
Defined in IHP.ServerSideComponent.Controller.ComponentsController Methods initialState :: ComponentsController component # | |
data ComponentInstance state Source #
Constructors
| ComponentInstance | If you wondered why the current rendered HTML doesn't need to be stored here for later diffing it: As our render functions are pure we can just re-render the HTML based on the state when we want to do our diffing |
Fields
| |
Instances
| SetField "state" (ComponentInstance state) state Source # | |
Defined in IHP.ServerSideComponent.Types Methods setField :: state -> ComponentInstance state -> ComponentInstance state # | |
Error types for SSC operations sent to the client
Constructors
| SSCDiffError | |
Fields
| |
| SSCActionError | |
Fields
| |
| SSCParseError | |
Fields
| |