UNPKG

string-to-react-component

Version:

Dynamically create and render React components from strings at runtime, converting strings to React components for flexible UI generation.

13 lines 462 B
import _bindInstanceProperty from "@babel/runtime-corejs3/core-js-stable/instance/bind"; import React from 'react'; import Ctx from './ctx'; import * as Babel from '@babel/standalone'; import StringToReact from './strintToReact'; var getCtx = function getCtx(React, Babel, rerender) { return new Ctx(React, Babel, rerender); }; export default _bindInstanceProperty(StringToReact).call(StringToReact, null, { getCtx: getCtx, Babel: Babel, react: React });