React Module
In the Module Builder settings interface, after switching the module type to interface
, the code editor will switch to react
code mode. Below is a simple example:
//entrypoint.js
import React, {useState} from 'react';
// main function
export default function CustomUI(props){
const {input,config,setConfig,setOutput} = props;
return (
<div style={{textAlign:"center"}}>
<h3>{config?.name}</h3>
<h6>{config?.author}</h6>
</div>)
}