1.6.10 • Published 2 months ago

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

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.11-alpha.0

2 months ago

1.6.10

4 months ago

1.6.9

6 months ago

1.6.8

6 months ago

1.6.7

9 months ago

1.6.6

9 months ago

1.6.4

11 months ago

1.6.5

11 months ago

1.6.3

11 months ago

1.6.2

12 months ago

1.6.2-alpha.2

1 year ago

1.6.2-alpha.1

1 year ago

1.6.1

1 year ago

1.6.0

1 year ago

1.6.2-alpha.0

1 year ago

1.5.8

1 year ago

1.5.7

1 year ago

1.5.6

1 year ago

1.5.4-alpha.5

1 year ago

1.5.5

1 year ago

1.6.0-alpha.1

1 year ago

1.6.0-alpha.0

1 year ago

1.6.0-alpha.3

1 year ago

1.6.0-alpha.2

1 year ago

1.5.4-alpha.4

1 year ago

1.5.4-alpha.3

1 year ago

1.5.4-alpha.1

1 year ago

1.5.4-alpha.2

1 year ago

1.5.4-alpha.0

1 year ago

1.5.3

1 year ago

1.5.2

1 year ago

1.5.1

1 year ago

1.5.0

1 year ago

1.5.0-alpha.0

1 year ago

1.4.33

2 years ago

1.4.32

2 years ago

1.4.35

2 years ago

1.4.34

2 years ago

1.4.36

2 years ago

1.4.26

2 years ago

1.4.25

2 years ago

1.4.29

2 years ago

1.4.31

2 years ago

1.4.30

2 years ago

1.4.1

2 years ago

1.4.0

2 years ago

1.4.0-alpha.0

3 years ago

1.4.0-alpha.1

3 years ago

1.3.0

3 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

4 years ago

1.0.15

4 years ago

1.0.12

4 years ago

1.0.9

4 years ago

1.0.4

4 years ago

1.0.1-next.1

4 years ago

1.0.1-next.0

4 years ago

1.0.0

4 years ago

1.0.0-next.16

4 years ago

1.0.0-next.13

4 years ago

1.0.0-next.11

4 years ago

1.0.0-next.10

4 years ago

1.0.0-next.9

4 years ago

1.0.0-next.8

4 years ago

0.4.1

4 years ago

1.0.0-next.5

4 years ago

1.0.0-next.6

4 years ago

1.0.0-next.4

4 years ago

1.0.0-next.1

4 years ago

1.0.0-next.2

4 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

5 years ago

0.3.3-next.3

5 years ago

0.3.1

5 years ago

0.3.0

5 years ago

0.2.15

5 years ago

0.2.10

5 years ago

0.2.9

5 years ago

0.2.8

5 years ago

0.2.7

5 years ago

0.2.2

5 years ago

0.2.0

5 years ago

0.1.7

5 years ago

0.1.6

5 years ago

0.1.5

5 years ago

0.1.4

5 years ago

0.1.2

5 years ago

0.1.1

5 years ago