Allow plugin apps to use React on top level #16819
Labels
enhancement
New value added to drive a business result
Team:Core
Core services & architecture: plugins, logging, config, saved objects, http, ES client, i18n, etc
Currently the whole app infrastructure within plugins is tightly coupled with Angular. It's not "easily" possible to create an app within a plugin, that uses React at the top level. The easiest way I currently found is:
If you don't use the
uiRoutes.enable
(e.g. by just usingchrome.setRootTemplate
), you will(a) have to somehow wait for Angular to boot up and the next digest cycle for the chrome to actually render the template, which can easily lead to ugly code like:
(b) as long as you don't use
uiRoutes
not all services will work as expected, since some setup work will be done via theuiRoutes.addSetupWorks
methods. All those services (e.g. timefilter) would need manual setup work when not using the Angular routing.I think we should have a high level API, like
chrome.setRootComponent(<MyComponent />)
to mount React components and still have all the services that an application might need in tact, unless they are all able to work without Angular.The text was updated successfully, but these errors were encountered: