Type defining properties that can be passed to the functional or class-based component with these properties. Default type is an empty object (no properties).
Type defining components, elements or other objects that can be used as
children for the component with these properties. Default is any
.
Defines event handler that is invoked when reference value changes.
Type of vnref property that can be passed to JSX elements.
Tuple containing parameters of event handler in the following order:
DOM event type, e.g. MouseEvent
Type of event handler function for DOM events of type T.
DOM event type, e.g. MouseEvent
Union type that can be passed to an Element's event.
DOM event type, e.g. MouseEvent
Type for defining the id property of HTML elements
Defines event handler that is invoked when reference value changes.
Definition of type of method that renders content.
Type of functions scheduled to be called either before or after the update cycle.
The UpdateStrategy object specifies different aspects of update behavior of components and elements.
Flag determining whether or not non-matching new keyed sub-nodes are allowed to recycle non- matching old keyed sub-nodes. Here "non-matching" means those new or old nodes with keys for which no old or new sub-nodes with the same key were found. If this flag is true, then non-matching old sub-nodes will be removed and non-matching new sub-nodes will be inserted. If this flag is false, then non-matching old sub-nodes will be updated by the non-matching new sub-nodes - provided that the types of sub-nodes are the same.
If keyed sub-nodes recycling is enabled it can speed up an update process because less DOM nodes get removed and inserted, which is more expensive than updating. However, this can have some adverse effects under cirtain circumstances if certain data is bound to the particular instances of DOM nodes.
The flag's default value is false, that is recycling is enabled.
Symbol that is attached to a render function to indicate that it should not be wrapped in a watcher.
An artificial "Fragment" component that is only used as a temporary collection of other items
in places where JSX only allows a single item. Our JSX factory function creates a virtual node
for each of its children and the function is never actually called. This function is only needed
because currently TypeScript doesn't allow the <>
fragment notation if a custom JSX factory
function is used.
Use it as follows:
import * as mim from "mimbl"
.....
render()
{
return <Fragment>
<div1/>
<div2/>
<div3/>
</Fragment>
}
Creates text virtual node, whcih can be used to update the text without re-rendering parent element.
Text to initialize the text node
JSX Factory function. In order for this function to be invoked by the TypeScript compiler, the tsconfig.json must have the following option:
"compilerOptions":
{
"jsx": "react",
"jsxFactory": "jsx"
}
The .tsx files must import the mimbl module as mim: import * as mim from "mimbl"
Renders the given content (usually result of JSX expression) under the given HTML element // asynchronously.
Content to render.
DOM element under which to render the content. If null or undefined,then render under the document.body tag.
Decorator function for tagging a component's render function so that it will not be wrapped in a watcher.
Decorator function for creating reference properties without the need to manually create Ref<> instances. This allows for the following code pattern:
class A extends Component
{
@ref myDiv: HTMLDivElement;
render() { return <div ref={this.myDiv}>Hello</div>; }
}
In the above example, the myDiv property will be set to point to the HTML div element.
Registers custom attribute handler class for the given property name.
Registers custom event for the given property name.
Helper function to set the value of the reference that takes care of the different types of
references. The optional onlyIf
parameter may specify a value so that only if the reference
currently has the same value it will be replaced. This might be needed to not clear a
reference if it already points to a different object.
Ref object to which the new value will be set
Reference value to set to the Ref object
An optional value to which to compare the current (old) value of the reference.
The new value will be set only if the old value equals the onlyIf
value.
Removes the content that was originally generated by the mount function.
DOM element under which the content was previously rendered.
Generated using TypeDoc
Type used to define properties that can be passed to a class-based component.