Skip to content
Branch: master
Find file History
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
..
Failed to load latest commit information.
src
types
CHANGELOG.md
README.md
package.json
tsconfig.cjs.json
tsconfig.json
tslint.json

README.md

@feature-hub/demos

Website

A collection of demos (including integration tests) for the Feature Hub.

Getting Started

Go to the monorepo top-level directory and install all dependencies:

yarn

Now run one of the following demos:

AMD Module Loader

Demonstrates:

  • how the AMD module loader can be provided to the FeatureAppManager so that Feature Apps that are deployed as AMD bundles can be loaded on the client
yarn watch:demo module-loader-amd

CommonJS Module Loader

Demonstrates:

  • how the CommonJS module loader can be provided to the FeatureAppManager so that Feature Apps that are deployed as CommonJS bundles can be loaded on the server
yarn watch:demo module-loader-commonjs

Feature App in Feature App

Demonstrates:

  • how a React Feature App can render another Feature App
  • how externals must be configured to make the feature work
  • how the AMD module loader can be used to provide externals
yarn watch:demo feature-app-in-feature-app

History Service

Demonstrates:

  • how multiple consumers can share the browser URL through the History Service
  • how the integrator can propagate the server request URL to the History Service (via the Server Request Provider)
yarn watch:demo history-service

Server-Side Rendering

Demonstrates:

  • how the Async SSR Manager can be used to manage aysnchronous server-side rendering with React
  • how the Serialized State Manager can be used to transfer the state of server-rendered Feature Apps to the client
  • how server-rendered Feature Apps can be preloaded in the client before hydration
  • how external stylesheets of Feature Apps can be added to the document during SSR
yarn watch:demo server-side-rendering

Custom Logging

Demonstrates:

  • how to configure custom loggers for the server and client, using pino on the server, and a customized console on the client
yarn watch:demo custom-logging

React Error Handling

Demonstrates:

  • how to define a renderError prop for the React FeatureAppLoader to render a custom error UI when a Feature App can not be rendered
  • how to define an onError prop for the React FeatureAppLoader to customize error handling (e.g. logging) for a Feature App that can not be rendered
yarn watch:demo react-error-handling

TodoMVC

Demonstrates:

  • how to compose the TodoMVC application using three Feature Apps and a Feature Service
yarn watch:demo todomvc

DOM Integrator

Demonstrates:

  • how the @feature-hub/dom package can be used to render DOM Feature Apps using Web Components
yarn watch:demo integrator-dom

Advanced Routing

Demonstrates:

  • how the @feature-hub/history-service package and a custom navigation service can be utilized to push location changes from one Feature App to another
yarn watch:demo advanced-routing

Copyright (c) 2018-2019 SinnerSchrader Deutschland GmbH. Released under the terms of the MIT License.

You can’t perform that action at this time.