ReactElement class

A virtual DOM element representing an instance of a DOM element, React component, or fragment.

React elements are the building blocks of React applications. One might confuse elements with a more widely known concept of "components". An element describes what you want to see on the screen. React elements are immutable.

Typically, elements are not used directly, but get returned from components.

These can be created directly by React.createElement, or by invoking React element DOM/component factories.

react.h1({}, 'Content here');
MaterialButton({}, 'Click me');

See reactjs.org/docs/glossary.html#elements and reactjs.org/docs/glossary.html#components.

Annotations
  • @JS()
  • @anonymous

Constructors

ReactElement()

Properties

hashCode int
The hash code for this object.
no setterinherited
key String
This element's key, which is used to uniquely identify it among its siblings.
no setter
props InteropProps
The props this element was created with.
no setter
ref → dynamic
This element's ref, which can be used to access the associated Component/ReactComponent/Element after it has been rendered.
no setter
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
type → dynamic
The type of this element.
no setter

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited