/** * @athenna/vite * * (c) João Lenon * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ import { Macroable } from '@athenna/common'; export declare class React extends Macroable { /** * The same as using `React.loadComponent()` method: * * @example * ```ts * // 'resources/app/app.tsx' * const entrypoint = Config.get('http.vite.ssrEntrypoint') * * const { createApp } = await React.loadComponent(entrypoint) * ``` */ static loadEntrypoint(): Promise; /** * Automatically compile a React component using Vite * dev server and import it. In production the server * manifest.json file will be read instead. * * @example * ```ts * const { createApp } = await React.loadComponent('resources/app/app.tsx') * ``` */ static loadComponent(path: string): Promise; /** * Render a React component to an HTML string. * * @example * ```ts * const { createApp } = await React.loadComponent('resources/app/app.tsx') * * const htmlElement = await React.renderComponent(createApp(request.baseUrl)) * ``` */ static renderComponent(component: any): Promise; }