How to create react components in new tab on some commands.July 14, 2019 at 8:12pm
Hi, I'm new to theia, I want to create new widget in main layout which takes some user inputs and shows some messages based on the input, I created widget in left panel, but I want a new screen in tab which can contain many react components, how do I achieve this?
July 15, 2019 at 7:24am
Your widget can extend
ReactWidgetand you can implement
rendermethod with the custom component embedding ohter react components.
I don't really understand what you mean by
a new screen. A widget? a window?
In order to attach a widget to the shell, you shuold always use
ApplicationShell.attachWidget. It accepts options like in which area widget should be shown, relative to which widget, before, after, split into some direction and so on..
July 15, 2019 at 5:03pm
July 16, 2019 at 6:43am
ctorof the view contribution for the
Look the superclass implementation how it handles opening: https://github.com/theia-ide/theia/blob/da653c2692ad65c865ca5ba96b865b270cc916ff/packages/core/src/browser/shell/view-contribution.ts#L98.