Callback that can short-circuit along the way when conditions you specify, aren't met.
Callback that can short-circuit along the way when conditions you specify, aren't met.
Especially useful for event handlers such as key handlers, drag-and-drop handlers, etc, where you check a condition, perform an effect, check another condition, perform another effect, etc.
This is meant to be lightweight, and be immediately useful without the typical pain of imports, implicit conversions and extension methods then normally accompany monad transforms in Scala.
For a more generic (i.e. beyond Option) or comprehensive monad transformer use Scalaz or similar.
A function to be executed later, usually by scalajs-react in response to some kind of event.
A function to be executed later, usually by scalajs-react in response to some kind of event.
The purpose of this class is to lift effects into the type system, and use the compiler to ensure safety around callbacks (without depending on an external library like Scalaz).
() => Unit
is replaced by Callback
.
Similarly, ReactEvent => Unit
is replaced by ReactEvent => Callback
.
The type of result produced when the callback is invoked.
0.10.0
Describes how a component uses .props.children
.
Extensions to plain old DOM.
Extensions to plain old DOM.
Base class for something that has read/write state access (under the same effect type).
Base class for something that has read/write state access (under the same effect type).
Passing this around (top-level) is fine but do not use it in a generic/library/helper method. In intermediary positions, use StateAccessor instead.
The type of effect when accessing state.
State type.
A callback with no return value.
A callback with no return value. Equivalent to () => Unit
.
CallbackTo
Type-classes that provide read and/or write access to state.
Scala.JS currently doesn't support annotating facades for both script- and module-style output.
Scala.JS currently doesn't support annotating facades for both script- and module-style output. The default in scalajs-react remains script-style; users who use module-style and webpack/scalajs-bundler should simply reference the relevant objects below so that webpack 1) imports them, and 2) exposes them correctly.