You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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:
import{MountApp}from'frint-react';constfooApp;// instancefunctionBarComponent(){// render a given app with instancereturn<MountAppapp={fooApp}>;
// render a given app by name
return <MountAppname="FooAppName"/>
// render any component against an app
return <MountAppname="FooAppName"/* or app={fooApp} */render={()=><SomeComponent/>}/>;
}
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.
The text was updated successfully, but these errors were encountered:
Currently
We use
getMountableComponent(app)
function, to get a component which has theapp
inside React's context.Proposal
We can have a
MountApp
component, with usage like:Further usage
In
frint-react
: TheMountApp
component can then be used byRegion
component andrender
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.
The text was updated successfully, but these errors were encountered: