UNPKG

lexer-state

Version:

Lightweight state machine library to define and manage state transition declaratively

16 lines 737 B
"use strict"; var __importDefault = (this && this.__importDefault) || function (mod) { return (mod && mod.__esModule) ? mod : { "default": mod }; }; Object.defineProperty(exports, "__esModule", { value: true }); exports.ComposedProviders = void 0; const jsx_runtime_1 = require("react/jsx-runtime"); const react_1 = __importDefault(require("react")); function ComposedProviders(props) { const { providers = [], children } = props; return ((0, jsx_runtime_1.jsx)(jsx_runtime_1.Fragment, { children: providers.reduceRight((acc, Comp) => { return react_1.default.createElement(Comp.type, Comp.props, acc); }, children) })); } exports.ComposedProviders = ComposedProviders; //# sourceMappingURL=compose.js.map