1.6.7 • Published 2 months ago

@alicloud/console-os-react-portal v1.6.7

Weekly downloads
180
License
MIT
Repository
-
Last release
2 months ago

Console OS React Portal

Basic Use

Replace the ReactDOM.render to mount function in @alicloud/console-os-react-portal

import { mount } from '@alicloud/console-os-react-portal';
import App from './app';

export default mount(
  App,
  // dom, you mount no in console os environment
  document.getElementById('app'),
  // sub app id
  'sub-app'
);

Sync Router

If you are use the react-router, and you want to your Main Application (Parent Application) to controll your router,

you can use util funtion withSyncHistory in @alicloud/console-os-react-portal.

import { mount, withSyncHistory } from '@alicloud/console-os-react-portal';
import { createBrowserHistory } from 'history';
import App from './app';

const history = createBrowserHistory();

export default mount(
  // add this wrapper
  withSyncHistory(App, history),
  // dom, you mount no in console os environment
  document.getElementById('app'),
  // sub app id
  'sub-app'
);

Then in parent application, when you pass the path props, sub app will rediect to that path.

import ConsoleApp from '@alicloud/console-os-react-app'

const MANIFEST_URL = 'http://cdn.com/sub-app.manifest.json'

export default () => (
  <ConsoleApp
    path="/sub-app" // it will redirect the sub app to path /sub-app
    manifest={MANIFEST_URL}
  />
)
1.6.7

2 months ago

1.6.6

2 months ago

1.6.4

4 months ago

1.6.5

4 months ago

1.6.3

4 months ago

1.6.2

5 months ago

1.6.2-alpha.2

6 months ago

1.6.2-alpha.1

6 months ago

1.6.1

8 months ago

1.6.0

8 months ago

1.6.2-alpha.0

7 months ago

1.5.8

10 months ago

1.5.7

10 months ago

1.5.6

10 months ago

1.5.4-alpha.5

10 months ago

1.5.5

10 months ago

1.6.0-alpha.1

8 months ago

1.6.0-alpha.0

8 months ago

1.6.0-alpha.3

8 months ago

1.6.0-alpha.2

8 months ago

1.5.4-alpha.4

10 months ago

1.5.4-alpha.3

10 months ago

1.5.4-alpha.1

10 months ago

1.5.4-alpha.2

10 months ago

1.5.4-alpha.0

11 months ago

1.5.3

11 months ago

1.5.2

11 months ago

1.5.1

11 months ago

1.5.0

11 months ago

1.5.0-alpha.0

11 months ago

1.4.33

1 year ago

1.4.32

1 year ago

1.4.35

12 months ago

1.4.34

1 year ago

1.4.36

12 months ago

1.4.26

1 year ago

1.4.25

1 year ago

1.4.29

1 year ago

1.4.31

1 year ago

1.4.30

1 year ago

1.4.1

2 years ago

1.4.0

2 years ago

1.4.0-alpha.0

2 years ago

1.4.0-alpha.1

2 years ago

1.3.0

2 years ago

1.2.2

3 years ago

1.2.0

3 years ago

1.2.1

3 years ago

1.1.1-alpha.4

3 years ago

1.1.1-alpha.3

3 years ago

1.1.1-alpha.2

3 years ago

1.0.16

3 years ago

1.0.15

3 years ago

1.0.12

3 years ago

1.0.9

3 years ago

1.0.4

3 years ago

1.0.1-next.1

3 years ago

1.0.1-next.0

3 years ago

1.0.0

3 years ago

1.0.0-next.16

3 years ago

1.0.0-next.13

3 years ago

1.0.0-next.11

3 years ago

1.0.0-next.10

3 years ago

1.0.0-next.9

3 years ago

1.0.0-next.8

3 years ago

0.4.1

3 years ago

1.0.0-next.5

3 years ago

1.0.0-next.6

3 years ago

1.0.0-next.4

3 years ago

1.0.0-next.1

3 years ago

1.0.0-next.2

3 years ago

0.4.0-alpha.6

4 years ago

0.4.0-alpha.5

4 years ago

0.4.0-alpha.3

4 years ago

0.4.0-alpha.2

4 years ago

0.4.0-alpha.1

4 years ago

0.4.0-alpha.0

4 years ago

0.3.8

4 years ago

0.3.8-alpha.1

4 years ago

0.3.7

4 years ago

0.3.6

4 years ago

0.3.5

4 years ago

0.3.3

4 years ago

0.3.3-next.4

4 years ago

0.3.3-next.3

4 years ago

0.3.1

4 years ago

0.3.0

4 years ago

0.2.15

4 years ago

0.2.10

4 years ago

0.2.9

4 years ago

0.2.8

4 years ago

0.2.7

4 years ago

0.2.2

4 years ago

0.2.0

4 years ago

0.1.7

4 years ago

0.1.6

4 years ago

0.1.5

4 years ago

0.1.4

4 years ago

0.1.2

4 years ago

0.1.1

4 years ago