Package react4j
Class ReactElement
java.lang.Object
react4j.ReactElement
- All Implemented Interfaces:
ReactNode
@JsType(isNative=true,
name="Object",
namespace="<global>")
public class ReactElement
extends Object
implements ReactNode
Element represents either a view or a host component.
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic ReactElement
createFragment
(String key, ReactNode... children) static ReactElement
createHostElement
(String type, String key, Object ref, jsinterop.base.JsPropertyMap<Object> inputs) static ReactNode
createStrictMode
(ReactNode... children) Create a StrictMode component with the specified children.static ReactElement
createSuspense
(String key, ReactNode fallback, int maxTimeToFallback, ReactNode... children) static ReactElement
final ReactElement
dup()
final ReactElement
final jsinterop.base.JsPropertyMap<Object>
inputs()
final String
key()
protected final void
final void
-
Constructor Details
-
ReactElement
public ReactElement()
-
-
Method Details
-
dup
-
createViewElement
@JsOverlay @Nonnull public static ReactElement createViewElement(@Nonnull ViewConstructorFunction type) -
createFragment
@JsOverlay @Nonnull public static ReactElement createFragment(@Nullable String key, @Nonnull ReactNode... children) -
createStrictMode
Create a StrictMode component with the specified children.- Parameters:
children
- the child nodes.- Returns:
- a new React.StrictMode component.
-
createSuspense
@JsOverlay @Nonnull public static ReactElement createSuspense(@Nullable String key, @Nullable ReactNode fallback, int maxTimeToFallback, @Nonnull ReactNode... children) -
createHostElement
@JsOverlay @Nonnull public static ReactElement createHostElement(@Nonnull String type, @Nullable String key, @Nullable Object ref, @Nonnull jsinterop.base.JsPropertyMap<Object> inputs) -
key
-
setKey
-
inputs
-
input
-
setInputs
-