@brightinteractive/bright-js-framework

@brightinteractive/bright-js-framework

interface Action

Object describing a mutation to the application datastore.

interface Dispatcher<A>

Dispatcher function injected by the @dispatcher() decorator

interface HostInfo

Service providing information about the host

interface Location

Components of parsed page location

interface RouteProps<ParamKeys, QueryKeys>

Props passed into a component annotated with @route

interface SelectFn<T, Props>

Function describing how to select data from the application datastore.

Passed to the @select() decorator

interface ServiceContext

Opaque object passed into service constructors

interface StateSelection<T>

Service created by the @select decorator containing current value of an application state subscription.

class BrowserActions

Service for performing actions on the browser. Works across all environments.

class PluginConfig<T>

Configuration class for providing additonal features (such as data-fetching, authentication providers, etc) to an application.

Plugins declare dependencies by using the @exported decorator.

class Service<State>

Base class for creating Services.

Services are classes that have access to a subset of the React Component API. They are owned by a parent component, and receive lifecycle events.

function controller(): ClassDecorator

Declare that a component is a controller.

function route(path: string): ClassDecorator

Declare a component as a route and associate a path with it. All components in your project's pages directory (by default, src/pages) that are decorated with @route will be served to users.

@dispatcher()

Injects the application’s action dispatcher into a controller or service

@exported(id: string)

Declare that a property of a PluginConfig is available for injection into components and services.

@hostInfo()

Service providing information about the host

@inject(key: __type)

Declare that a property of a Controller, Service or PluginContext should be fulfilled using dependency injection.

@select(selectFn: SelectFn<T, Props>props: undefined | ???)

Injects a StateSelector into the component

@service(constructor: ServiceConstructor)

Attach a service to a property of a controller or other service.

@state(key: string)

Declare how to manage state changes for an aspect of application state.

@select(location)
StateSelection<Location>

Select the current page location