/hvm-react-component

Render a Kind app as a React component.

Primary LanguageJavaScript

HVM React Component

Renders an interactive Kind2 App as a React Component.

Here is a live version of a Demo App made with Kind2, running on the browser.

Check the Kind2 source on Wikind/Apps/Demo, and the React usage on src/index.js.

Usage

  1. Install:
npm i --save hvm-react-component
  1. Compile your Kind2 app to HVM:
kind2 to-hvm Apps/MyApp/_.kind2
  1. Include it on your React app:
import HVM_Component from "hvm-react-component";

const main = "Apps.MyApp";
const code = "code_here";

function MyApp() {
  return <HVM_Component main={main} code={code} />;
}