Type of a component's this
scope as is available to backends.
Type of a component's this
scope as is available to backends.
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
A component that takes props
as an argument and returns the element to render.
A component that takes props
as an argument and returns the element to render.
These components behave just like a React class with only a render
method defined.
Since no component instance is created for a functional component, any ref added to one will evaluate to null
.
Functional components do not have lifecycle methods.
"In the future, we’ll also be able to make performance optimizations specific to these components by avoiding unnecessary checks and memory allocations."
React 0.14
Type of this.props.children
Type of this.props.children
Additional methods that React mixes into this.props
Additional methods that React mixes into this.props
React.Children
React.Children
A component created via React.createClass.
A component created via React.createClass.
Component constructor.
The underlying function that creates a Scala-based React component instance.
The underlying function that creates a Scala-based React component instance.
A JS function that creates a React component instance.
A JS function that creates a React component instance.
An instance of a React component.
An instance of a React component. Prefer using the subtype ReactComponentU instead.
A mounted Scala component.
A mounted Scala component.
A mounted component.
A mounted component. Not guaranteed to have been created by Scala, could be a React addon.
These exist for type inference.
These exist for type inference. If P,S,B,N types are needed and there's another object that has them, this is used to bridge for type inference.
An unmounted Scala component.
An unmounted Scala component.
An unmounted component.
An unmounted component. Not guaranteed to have been created by Scala, could be a React addon.
A React virtual DOM element, such as 'div', 'table', etc.
A React virtual DOM element, such as 'div', 'table', etc.
ReactElement = ReactComponentElement | ReactDOMElement
ReactElement = ReactComponentElement | ReactDOMElement
Extensions to plain old DOM.
Extensions to plain old DOM.
https://facebook.github.io/react/docs/glossary.html indicates children can be a super type of ReactElement.
https://facebook.github.io/react/docs/glossary.html indicates children can be a super type of ReactElement. Array and null are acceptable, thus this can be 0-n elements.
A named reference to an element in a React VDOM.
Type of this.refs
Type of this.refs
https://github.com/facebook/react/blob/master/src/browser/syntheticEvents/SyntheticClipboardEvent.js
https://github.com/facebook/react/blob/master/src/browser/syntheticEvents/SyntheticClipboardEvent.js
https://github.com/facebook/react/blob/master/src/browser/syntheticEvents/SyntheticCompositionEvent.js
https://github.com/facebook/react/blob/master/src/browser/syntheticEvents/SyntheticCompositionEvent.js
https://github.com/facebook/react/blob/master/src/browser/syntheticEvents/SyntheticDragEvent.js
https://github.com/facebook/react/blob/master/src/browser/syntheticEvents/SyntheticDragEvent.js
https://facebook.github.io/react/docs/events.html
https://facebook.github.io/react/docs/events.html
https://github.com/facebook/react/blob/master/src/browser/syntheticEvents/SyntheticFocusEvent.js
https://github.com/facebook/react/blob/master/src/browser/syntheticEvents/SyntheticFocusEvent.js
https://github.com/facebook/react/blob/master/src/browser/syntheticEvents/SyntheticKeyboardEvent.js
https://github.com/facebook/react/blob/master/src/browser/syntheticEvents/SyntheticKeyboardEvent.js
https://github.com/facebook/react/blob/master/src/browser/syntheticEvents/SyntheticMouseEvent.js
https://github.com/facebook/react/blob/master/src/browser/syntheticEvents/SyntheticMouseEvent.js
https://github.com/facebook/react/blob/master/src/browser/syntheticEvents/SyntheticTouchEvent.js
https://github.com/facebook/react/blob/master/src/browser/syntheticEvents/SyntheticTouchEvent.js
https://github.com/facebook/react/blob/master/src/browser/syntheticEvents/SyntheticUIEvent.js
https://github.com/facebook/react/blob/master/src/browser/syntheticEvents/SyntheticUIEvent.js
https://github.com/facebook/react/blob/master/src/browser/syntheticEvents/SyntheticWheelEvent.js
https://github.com/facebook/react/blob/master/src/browser/syntheticEvents/SyntheticWheelEvent.js
Allows Scala classes to be used in place of Object
.
Allows Scala classes to be used in place of Object
.
A callback with no return value.
A callback with no return value. Equivalent to () => Unit
.
CallbackTo
Here we break React's this
into tiny little bits, then stitch them together to use type-safety to enforce the
rules documented in the React API.
React Component Builder.
Scalatags version = cdf3d4797236a7d31dc413c1c8ba45466ea4a1c6