# How to get kernel of mainareawidget?

**URL:** <https://discourse.jupyter.org/t/how-to-get-kernel-of-mainareawidget/22769>\
**Category:** Widgets\
**Tags:** community, jupyterlab, how-to, help-wanted\
**Created:** [December 6, 2023, 4:02pm UTC](https://discourse.jupyter.org/t/how-to-get-kernel-of-mainareawidget/22769 "2023-12-06T16:02:05Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Terlan](https://yyz1.discourse-cdn.com/flex031/user_avatar/discourse.jupyter.org/terlan/32/11520_2.png) [@Terlan](https://discourse.jupyter.org/u/Terlan)\
**Post date:** [December 6, 2023, 4:02pm UTC](https://discourse.jupyter.org/t/how-to-get-kernel-of-mainareawidget/22769/1 "2023-12-06T16:02:05Z")

</div>

Hi, I need to access to kernel from MainAreaWidget instance? How can I achieve this? Thanks

---

<div class="post-metadata">

**Author:** ![pplonski](https://yyz1.discourse-cdn.com/flex031/user_avatar/discourse.jupyter.org/pplonski/32/5651_2.png) [@pplonski](https://discourse.jupyter.org/u/pplonski)\
**Post date:** [December 28, 2023, 11:03am UTC](https://discourse.jupyter.org/t/how-to-get-kernel-of-mainareawidget/22769/2 "2023-12-28T11:03:48Z")

</div>

Are you working on some extension? Do you have example code snippet where you need to access kernel? Why do you need kernel?

---

<div class="post-metadata">

**Author:** ![ThibautDR](https://yyz1.discourse-cdn.com/flex031/user_avatar/discourse.jupyter.org/thibautdr/32/13005_2.png) [@ThibautDR](https://discourse.jupyter.org/u/ThibautDR)\
**Post date:** [February 4, 2024, 8:16am UTC](https://discourse.jupyter.org/t/how-to-get-kernel-of-mainareawidget/22769/3 "2024-02-04T08:16:16Z")

</div>

Hi Terlan, your question is, I believe, close to a questin I had asked a few months ago:

> [@Best way to integrate a Kernel with a React Widget in a JupyterLab Extension](https://discourse.jupyter.org/t/best-way-to-integrate-a-kernel-with-a-react-widget-in-a-jupyterlab-extension/22104):
>
> Hello everyone, I’m working on an extension which consists in a React Widget. Looking at different extension examples I had created a Factory to create my widget and everything works fine. I defined the following behavior of opening the widget for the .pipeline files: // Add the default behavior of opening the widget for .pipeline files app.docRegistry.addFileType( { name: 'react-pipeline', displayName: 'Pipeline', extensions: ['.p…
