0.2.6 • Published 2 years ago

@newfold/mfe-provider v0.2.6

Weekly downloads
-
License
-
Repository
-
Last release
2 years ago

@newfold/mfe-provider

<MFEProvider /> is a React Library for Jarvis Micro-Frontend (MFE) Applications that is designed to streamline the technology stack and solution architecture as the number of MFE applications grows.

Features

  • MUI
  • Error Boundary
  • i18n and l10n support
  • React Query
  • DataDog (RUM and Logging)
  • Host application & MFE context provider

Using the Library

Installation

$ yarn add "@newfold/mfe-provider"
# installing...

Wrapping your React application

import MFEProvider from '@newfold/mfe-provider';

const MyApp = () => (
  <MFEProvider>
    <App />
  </MFEProvider>
);

Using context

import { useMFEContext } from '@newfold/mfe-provider';

const Component = () => {
  const mfeContext = useMFEContext();

  // log context to see what values are available
  console.log('mfeContext', mfeContext);

  return (
    <h1>Hello world!</h1>
  );

Configuration

PropTypeDescription
childrenoneOfType(node, func)
historyshape({})
hostingIdnumber
basenamestring
hasErrorBoundarybool
errorBoundaryConfigshape({})
hasI18Nbool
i18nConfigshape({})
hasDataDogbool
dataDogConfigshape({})
hasReactQuerybool
reactQueryConfigshape({})
hasMUIbool
muiConfigshape({})
hasReactSuspensebool
reactSuspenseConfigshape({})
hasReactRouterDombool
reactRouterDomConfigshape({})

Developing and contributing to MFE Provider

Building

Run nx build mfe-provider to build the lib into /dist/libs/mfe-provider.

Publishing

Navigate to the /dist/libs/mfe-provider directory, then use yarn publish to publish. Ensure the correct version is provided and that the repo is up-to-date with the correct version as well in the package.json file.

Running unit tests

Run nx test mfe-provider to execute the unit tests via Jest.

0.2.4-alpha.1

2 years ago

0.2.4-alpha

2 years ago

0.2.6-alpha.1

2 years ago

0.2.6

2 years ago

0.2.6-alpha

2 years ago

0.2.5

2 years ago

0.2.4

2 years ago

0.2.3

2 years ago

0.2.3-alpha

2 years ago

0.2.2

2 years ago

0.2.2-alpha

2 years ago

0.2.1

2 years ago

0.2.0

2 years ago

0.1.1

2 years ago

0.1.1-alpha

2 years ago

0.1.0

2 years ago

0.0.3-alpha.12

2 years ago

0.0.3-alpha.11

2 years ago

0.0.3-alpha.10

2 years ago

0.0.3-alpha.9

2 years ago

0.0.3-alpha.8

2 years ago

0.0.3-alpha.7

2 years ago

0.0.3-alpha.6

2 years ago

0.0.3-alpha.5

2 years ago

0.0.3-alpha.4

2 years ago

0.0.3-alpha.3

2 years ago

0.0.3-alpha.2

2 years ago

0.0.3-alpha.1

2 years ago

0.0.3-alpha

2 years ago

0.0.7

2 years ago

0.0.6

2 years ago

0.0.2

2 years ago

0.0.4

2 years ago

0.0.3

2 years ago

0.0.1

2 years ago