Component<P, S> class

Component can be exteded to define a custom component.



Component(P _props, {dynamic key, bool vif: true})


beforeAnimationFrame BeforeAnimationFrame
beforeAnimationFrame can be overriden to return a function that runs before each animation frame is triggered. This is useful for conditionally setting state changes on every frame. It is idomatic to call setStateOnAnimationFrame inside of your callback rather than setState, even though they are
child VNode
child is the VNode returned from render
context Map<String, dynamic>
context returns the context map, including any context set by this component or its parents
hashCode int
The hash code for this object. [...]
read-only, inherited
key ↔ dynamic
A key to uniquly identify a VNode. If the key of a VNode changes the VNode will be forced to rerender
read / write, inherited
parent VNode
The parent virtual element
read / write, inherited
props → P
props returns the props passed to the component
ref Node
The acutal dom node for the virtual node
read / write, inherited-setter, override-getter
runtimeType Type
A representation of the runtime type of the object.
read-only, inherited
state → S
state returns the component's state value
vif bool
read / write, inherited
vNodeType → VNodeTypes
Identifies if the VNode is a component or element
read-only, override


componentDidMount() → void
componentDidUpdate(P prevProps, S prevState) → void
componentWillMount() → void
componentWillReceiveProps(P nextProps, S nextState) → void
componentWillUnmount() → void
componentWillUpdate(P nextProps, S nextState) → void
getChildContext() Map<String, dynamic>
getChildContext is the idomatic way to set context.
getInitialState() → S
getInitialState returns the default state for the component. It will be called before componentWillMount. It returns a default of null.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a non-existent method or property is accessed. [...]
queueStateUpdate(StateSetter<P, S> stateSetter) → void
queueStateUpdate queues a state change, but does not trigger an update
render() VNode
render is the only function that must be implemented by the superclass. It returns the virtual node representing what should be rendered to the actual dom.
setState(StateSetter<P, S> stateSetter) → void
setState queues a state change and runs update
setStateOnAnimationFrame(StateSetter<P, S> stateSetter) → void
setState queues a state change and runs updateOnAnimationFrame
setStateOnIdle(StateSetter<P, S> stateSetter, {bool shouldAbort: false}) → void
setState queues a state change and runs updateOnIdle
shouldComponentUpdate(P nextProps, S nextState) bool
toString() String
Returns a string representation of this object.
update() → void
update forces your component to update. The update will start immediatly and finish to completion.
updateOnAnimationFrame() → void
updateOnAnimationFrame queues an update to be run on the next animation frame. When the animation frame is fired the update will run to completion. Note that if multiple updates are queued using updateOnAnimationFrame inbetween frames, the update process will only be run once.
updateOnIdle({bool shouldAbort: false}) → void
updateOnIdle forces your component to update. The update will start on the next idle callback. If shouldAbort is set to false the component will always finish its update. If shouldAbort is true and a new update to this component is queued between idle callbacks, the previous update will abort. Note that even when shouldAbort is false, if another update is queued before an existing update starts, the update process will only be run once. [...]


operator ==(Object other) bool
The equality operator. [...]