Page Contents

Components are an important part of LoopBack 4. We are keeping the core small and easy to extend, making it easy for independent developers to contribute additional features to LoopBack. Components are the vehicle for bringing more goodness to your applications.

A typical LoopBack component is an npm package exporting a Component class which can be added to your application.

import {Application} from '@loopback/core';
import {AuthenticationComponent} from '@loopback/authentication';

const app = new Application();
app.component(AuthenticationComponent);

Alternatively, you can register a component through application config object.

const app = new Application({
  components: [AuthenticationComponent],
});

In general, components can contribute the following items:

In the future (before the GA release), components will be able to contribute additional items: