Refract
- Package
- purescript-refract
- Repository
- pkamenarsky/purescript-refract
#(○) Source
Operator alias for Control.Semigroupoid.compose (right-associative / precedence 9)
A synonym for <<<
.
#(×) Source
Operator alias for Data.Tuple.Tuple (right-associative / precedence 6)
A synonym for Tuple
.
#type (×) Source
Operator alias for Data.Tuple.Tuple (right-associative / precedence 6)
A type synonym for Tuple
.
#effectfully Source
effectfully :: forall st eff a. (st -> Aff eff a) -> Effect eff st a
Perform a Control.Monad.Aff
action and return a result.
#stateR Source
stateR :: forall st rs r eff. RecordToLens st r rs => Record r -> (Record rs -> Component eff st) -> Component eff st
stateL
for generic records.
Specializing to a concrete state, its type would be:
stateR
:: ∀ eff st.
{ name :: ALens' st String
, age :: ALens' st Int
}
-> ( { name :: String
, age :: Int
} -> Component eff st
)
-> Component eff st
#modifyR Source
modifyR :: forall st rs r eff. RecordToLens st r rs => Record r -> (Record rs -> Record rs) -> Effect eff st Unit
modifyL
for generic records.
Specializing to a concrete state, its type would be:
modifyR
:: ∀ eff st.
{ name :: ALens' st String
, age :: ALens' st Int
}
-> ({ name :: String , age :: Int } -> { name :: String , age :: Int })
-> Effect eff st Unit
#zoomR Source
zoomR :: forall st rs r eff. RecordToLens st r rs => Record r -> Component eff (Record rs) -> Component eff st
zoom
for generic records.
Specializing to a concrete state, its type would be:
zoomR
:: ∀ eff st.
{ name :: ALens' st String
, age :: ALens' st Int
}
-> Component eff
{ name :: String
, age :: Int
}
-> Component eff st
#Component Source
type Component eff st = (Effect eff st Unit -> Handler st) -> st -> ReactElement
A Component eff st
is parameterized over an effect type eff
and a
state type st
over which it operates.
#ComponentClass Source
type ComponentClass eff st = ReactClass ((Effect eff st Unit -> Handler st) × st)
A React component class. Useful whenever a Component
needs to implement
React lifecycle methods.
#Spec Source
type Spec eff st = { componentDidMount :: Effect eff st Unit, componentDidUpdate :: st -> Effect eff st Unit, componentWillMount :: Effect eff st Unit, componentWillUnmount :: Effect eff st Unit, componentWillUpdate :: st -> Effect eff st Unit, displayName :: String, shouldComponentUpdate :: st -> Boolean }
React lifecycle spec.
#defaultSpec Source
defaultSpec :: forall st eff. Spec eff st
No-op lifecycle method spec.
#componentClass Source
componentClass :: forall st eff. Spec eff st -> Component eff st -> ComponentClass eff st
Create a ComponentClass
from a Spec
and a Component
.
#component Source
component :: forall st eff. ComponentClass eff st -> Component eff st
Create a Component
from a ComponentClass
.
- Modules
- Props
- Refract
- Refract.
DOM - Refract.
Lens - Undefined