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.

12 lines 335 B
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 StringToReact.bind(null, { getCtx: getCtx, Babel: Babel, react: React });