Skip to main content

Module: createApp

Variables

ContainerContext

Const ContainerContext: Context<Container | null>

Defined in

createApp.tsx:24

Functions

createApp

createApp<T, S, R>(__namedParameters): App<T, S, R>

Description

You can create an app with createApp() passing app configuration, which will return an object including instance, store, and bootstrap() method(You can run bootstrap to start the app inject into the browser or mobile).

Example

import { createApp, injectable } from 'reactant';

@injectable()
class Foo {}

const app = createApp({
modules: [],
main: Foo,
render: () => {},
});

expect(app.instance instanceof Foo).toBeTruthy();

Type parameters

NameType
TT
Sextends any[]
Rextends Renderer<S>

Parameters

NameType
__namedParametersConfig<T, S, R>

Returns

App<T, S, R>

Defined in

createApp.tsx:51