All 4 blocks are documented below, including compatibility blocks and blocks available through optional features. Select a block to read its behavior, arguments, default values, and menu choices. Each block has a permanent link.
register React component [COMPONENT] from [MODULE]
Registers a React component name and the browser module that will hydrate it later.
Block type: COMMAND. Opcode: registerComponent. Permanent link
| Argument | Type | Default value | Menu choices |
|---|
COMPONENT | STRING | Counter | |
|---|
MODULE | STRING | /assets/react-islands.js | |
|---|
React island [COMPONENT] at [MOUNT_ID] props [PROPS_JSON]
Returns a JSON mount descriptor for a React island.
Block type: REPORTER. Opcode: reactIsland. Permanent link
| Argument | Type | Default value | Menu choices |
|---|
COMPONENT | STRING | Counter | |
|---|
MOUNT_ID | STRING | counter-root | |
|---|
PROPS_JSON | STRING | {"initialCount":0} | |
|---|
React island HTML [COMPONENT] at [MOUNT_ID] props [PROPS_JSON]
Returns a safe HTML fragment that marks where a React island should be mounted.
Block type: REPORTER. Opcode: reactIslandHtml. Permanent link
| Argument | Type | Default value | Menu choices |
|---|
COMPONENT | STRING | Counter | |
|---|
MOUNT_ID | STRING | counter-root | |
|---|
PROPS_JSON | STRING | {"initialCount":0} | |
|---|
React component registry JSON
Returns the registered React component registry as JSON.
Block type: REPORTER. Opcode: componentRegistryJson. Permanent link
This block has no arguments.