Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/paalamugan/single-spa-example-react-styleguide
React Styleguide Template supports language translation, multiple MUI theme, Global store for all microfrontend single spa application.
https://github.com/paalamugan/single-spa-example-react-styleguide
mui react react-intl scss single-spa single-spa-react styleguide
Last synced: about 5 hours ago
JSON representation
React Styleguide Template supports language translation, multiple MUI theme, Global store for all microfrontend single spa application.
- Host: GitHub
- URL: https://github.com/paalamugan/single-spa-example-react-styleguide
- Owner: paalamugan
- Created: 2022-07-16T18:15:46.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2022-07-18T13:52:22.000Z (over 2 years ago)
- Last Synced: 2024-11-14T20:51:48.098Z (5 days ago)
- Topics: mui, react, react-intl, scss, single-spa, single-spa-react, styleguide
- Language: TypeScript
- Homepage:
- Size: 163 KB
- Stars: 0
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Single Spa React Styleguide Template
React Styleguide Template supports language translation, multiple MUI theme, Global store for all microfrontend single spa application.
## How to use it
- Install as a node module package like
```sh
yarn add -D @single-spa-example/react-styleguide
```- Add a below code line in your react microfrontend single-spa main file, That file name look like this `orgName-projectName.tsx`,
```ts
import React from "react";
import ReactDOM from "react-dom";
import singleSpaReact from "single-spa-react";
import { MfErrorBoundary, withAppContainer } from "@single-spa-example/react-styleguide";const MyComponent = () =>
Hello World;const lifecycles = singleSpaReact({
React,
ReactDOM,
rootComponent: withAppContainer(MyComponent),
errorBoundary(err, info, props) {
return ;
},
});export const { bootstrap, mount, unmount } = lifecycles;
```## Getting started
- Supported Node Engine
```
node - v16.12.0
yarn - 1.22.19
```- Install node_modules package for first time only
```sh
yarn install
```- Run application in development mode
```sh
yarn start
```- Run application as a standalone in development mode
```sh
yarn start:standalone
```- To build for production
```sh
yarn build
```