# Implement component with react

**URL:** <https://discuss.elastic.co/t/implement-component-with-react/176102>\
**Category:** Kibana\
**Created:** [April 9, 2019, 8:58pm UTC](https://discuss.elastic.co/t/implement-component-with-react/176102 "2019-04-09T20:58:45Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![jasmineL](https://avatars.discourse-cdn.com/v4/letter/j/8797f3/32.png) [@jasmineL](https://discuss.elastic.co/u/jasmineL)\
**Post date:** [April 9, 2019, 8:58pm UTC](https://discuss.elastic.co/t/implement-component-with-react/176102/1 "2019-04-09T20:58:45Z")

</div>

Hi,

I am trying to create a component in Kibana using React. Like below.

```auto
<new-react-component>
  <div>some existing code in .html file
  </div>
</new-react-component>   

```

The new-react-component is a react component. And I did use something like reactDirective(wrapInI18nContext(NewReactComponent)). But it looks like children elements was not filled to props.children.  
Am I doing the correct way? How can I pass the nested children to the components?

Thanks!!

---

<div class="post-metadata">

**Author:** ![Marius\_Dragomir](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/marius_dragomir/32/42087_2.png) [@Marius\_Dragomir](https://discuss.elastic.co/u/Marius_Dragomir)\
**Post date:** [April 12, 2019, 9:56am UTC](https://discuss.elastic.co/t/implement-component-with-react/176102/2 "2019-04-12T09:56:52Z")

</div>

Hello,  
All Kibana components are created as part of EUI, so you could check that repo for more examples on how it's done. [https://github.com/elastic/eui](https://github.com/elastic/eui)

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [May 10, 2019, 9:56am UTC](https://discuss.elastic.co/t/implement-component-with-react/176102/3 "2019-05-10T09:56:53Z")

</div>

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
