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
timroes opened this issue
Feb 20, 2018
· 1 comment
Labels
enhancementNew value added to drive a business resultTeam:CoreCore 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 using chrome.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:
uiModules.get('kibana').run($timeout=>$timeout(()=>{/* mount react here */}));
(b) as long as you don't use uiRoutes not all services will work as expected, since some setup work will be done via the uiRoutes.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:
enhancementNew value added to drive a business resultTeam:CoreCore 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: