@hackforplay/react-ast-mutator-components
TypeScript icon, indicating that this package has built-in type declarations

1.4.0 • Public • Published

React AST Mutator Components

Build Status

Install

  • npm i -S @hackforplay/react-ast-mutator-components

React Project

import { RootComponent } from '@hackforplay/react-ast-mutator-components';
import { React, useState } from 'react';

export function MyComponent() {
  const [code, setCode] = useState('let a = 1');

  return <RootComponent code={code} onChange={value => setCode(value)} />;
}

Othe Framework

import { render } from '@hackforplay/react-ast-mutator-components';

let code = 'let a = 1';

update();

function update() {
  render(
    {
      code,
      onChange(value) {
        code = value;
        update();
      }
    },
    document.body
  );
}

Versions

Current Tags

  • Version
    Downloads (Last 7 Days)
    • Tag
  • 1.4.0
    0
    • latest

Version History

Package Sidebar

Install

npm i @hackforplay/react-ast-mutator-components

Weekly Downloads

0

Version

1.4.0

License

MIT

Unpacked Size

375 kB

Total Files

99

Last publish

Collaborators

  • teramotodaiki