UNPKG

metaf-react

Version:

Resolvable component and injection root for adding DI/IoC to React App

21 lines 1.02 kB
import React from 'react'; import { ApplicationRoot, IApplicationRootProps } from './ApplicationRoot'; /** * Exactly same as `ApplicationRoot` with only difference: * you are able to apply as many `MockRoot`s as your testing flow requires * @description MockRoot component * > **NOTE:** this component _MUST NOT_ be used as replacement for * `ApplicationRoot` in your production code, since it significantly affects * render flow in order to properly resolve dependencies for each subtree, * which may cause performance issues in some circumstances. * **BE AWARE THAT IT WAS DESIGNED FOR TESTING PURPOSES _ONLY_** */ export declare class MockRoot extends ApplicationRoot { /** * Creates an instance of mock root. * @param props exactly same `props` as `ApplicationRoot` uses */ constructor(props: Readonly<IApplicationRootProps>); render(): (React.ReactChild | React.ReactFragment | React.ReactPortal)[] | null | undefined; } //# sourceMappingURL=MockRoot.d.ts.map