0.0.0-beta.17 • Published 3 years ago

@schalltech/honeycomb-react-microapp v0.0.0-beta.17

Weekly downloads
7
License
-
Repository
github
Last release
3 years ago

NPM

Honeycomb React Microapp

ATTN: Honeycomb Studio, Honeycomb Marketplace, microapps, components and libraries are in pre-release and are not intended to be used in a production environment. The platform is currently under development and releases are not guaranteed to be backwards compatible.

Honeycomb StudioHoneycomb Marketplace

Honeycomb React Microapp is a Higher-Order Component (HOC) used to dynamically inject React based microapps into browser applications at runtime. It can be used in traditionally coded React applications as well as Honeycomb Cloud applications. It can also be used in other Honeycomb Microapps to create a nested hierarchy of microapps to render an entire page.

Installation

  1. Download and install the microapp package.

    yarn add @schalltech/honeycomb-react-microapp
    npm i @schalltech/honeycomb-react-microapp
  2. Once installed, import the package module.

    import MicroApp from '@schalltech/honeycomb-react-microapp';
  3. Add a microapp into your page layout and define its configuration.

    <MicroApp
       config={{
         View: {
           Name: 'ma-label',
           Scope: 'schalltech',
           Version: 'latest',
         },
         DefaultValue: 'Hello World!'
       }}
    />

Integration Example

The following is an example of how a Honeycomb Microapp could be integrated into an existing React application.

import React, { Component } from 'react';
import MicroApp from '@schalltech/honeycomb-react-microapp';

class ExampleHost extends Component {
  render() {
    return (
      <MicroApp
        config={{
          View: {
            Name: 'ma-label',
            Scope: 'schalltech',
            Version: 'latest'
          },
          DefaultValue: 'Hello World!'
        }}
      />
    );
  }
}

export default ExampleHost;