npm.io
0.0.3 • Published 5 years ago

ragu-client-react

Licence
MIT
Version
0.0.3
Deps
2
Size
8 kB
Vulns
0
Weekly
0

Ragu

Ragu Client React

Testing Coverage Status License: MIT npm version PRs Welcome

A React Client for Ragu Server - A micro-frontend framework.

Installation

npm install ragu-client-react

Usage

import {RaguComponent} from "ragu-client-react";


<RaguComponent src="https://my-micro-frontend-url/" />

| Property | Description | Required | Default | |-------------------- |--------------------------------------------------------------------------------------- |---------- |--------- | | src | The micro-frontend URL | true | - | | wrapper | The tag that wraps the micro-frontend | false | "div" | | prefetchResponse | A pre-fetch HTML version of the component (used for SSR) | false | - | | onFetchCompleted | A callback called when component fetch is finished. | false | - | | onFetchFail | A callback called when component fetch fails. | false | - | | onHydrateCompleted | A callback called when component was hydrated (it means, the render process finished) | false | - |