Proposal: MountApp component
- Dominant language
- JavaScript
- Stars
- 756
- Forks
- 33
- PR merge metrics
- No merged PRs in 30d
Description
## Currently
We use `getMountableComponent(app)` function, to get a component which has the `app` inside React's context.
## Proposal
We can have a `MountApp` component, with usage like:
```js
import { MountApp } from 'frint-react';
const fooApp; // instance
function BarComponent() {
// render a given app with instance
return ;
// render a given app by name
return
// render any component against an app
return }
/>;
}
```
## Further usage
In `frint-react`: The `MountApp` component can then be used by `Region` component and `render` function internally too.
`getMountableComponent` can be deprecated.
## Benefits
We don't have to depend on placing a Region with a name to mount an app somewhere. We can benefit from directly rendering an App somewhere without expecting any other App to share that region.
Contributor guide
Assessment
This issue has not been assessed yet.