Gate
Gate is a hook for conditional rendering, based on current value (or values) in props. An example of a problem that a Gate can solve - you can put together all required data, when component was mounted. Or show another component, if there is not enough data in props. Gate also looks good for Routing or animation, ReactTransitionGroup like.
This allows you to send props back to Store to create feedback loop interop.
Gate can have two states:
- Open, which means mounted
- Closed, which means unmounted
Gate Methods
childGate(childName?)
Returns child gate which won't render if parent gate is closed.
Returns
(Gate): Child gate
Gate Properties
isOpen
Returns
(boolean)
isTerminated
Returns
(boolean)
open
Returns
(Event)
close
Returns
(Event)
status
Returns
(Store)
destructor
Returns
(Event)
current
Returns
(Props)
state
Returns
(Store)