Module: createApp
Variables
ContainerContext
• Const ContainerContext: Context<Container | null>
Defined in
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
| Name | Type |
|---|---|
T | T |
S | extends any[] |
R | extends Renderer<S> |
Parameters
| Name | Type |
|---|---|
__namedParameters | Config<T, S, R> |
Returns
App<T, S, R>