You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
npm i -S @hackforplay/react-ast-mutator-components
React Project
import{RootComponent}from'@hackforplay/react-ast-mutator-components';import{React,useState}from'react';exportfunctionMyComponent(){const[code,setCode]=useState('let a = 1');return<RootComponentcode={code}onChange={value=>setCode(value)}/>;}
Othe Framework
import{render}from'@hackforplay/react-ast-mutator-components';letcode='let a = 1';update();functionupdate(){render({
code,onChange(value){code=value;update();}},document.body);}