menu
announcement

Spectrum is now read-only. Learn more about the decision in our official announcement.

Theia

Eclipse Theia - Cloud & Desktop IDE

Channels
Team

How to create react components in new tab on some commands.

July 14, 2019 at 8:12pm

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 ReactWidget and you can implement render method with the custom component embedding ohter react components.
like-fill
1
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..
like-fill
1

July 15, 2019 at 5:03pm
If I open file it open new editor like that I need create new view which contains some components

July 16, 2019 at 6:43am
ok, have a look at OutputContribution if you are interested in the singleton view and at EditorManager implementation if you are interested to have multiple instances of a widget.
Can i get any example links for ApplicationShell and OutputContribution.