# Using vtk with react

**URL:** https://discourse.vtk.org/t/using-vtk-with-react/11833
**Category:** Support
**Created:** [June 27, 2023, 2:29pm UTC](https://discourse.vtk.org/t/using-vtk-with-react/11833 "2023-06-27T14:29:15Z")
**Posts on this page:** 5
**Page:** 1

<div class="post-metadata">

### Author: ![zmladen](https://discourse.vtk.org/letter_avatar_proxy/v4/letter/z/dfb087/32.png) [@zmladen](https://discourse.vtk.org/u/zmladen)
#### Post date: [June 27, 2023, 2:29pm UTC](https://discourse.vtk.org/t/using-vtk-with-react/11833/1 "2023-06-27T14:29:15Z")

</div>

Hello,

i wanted to try the example of using vtk with reactjs, but the code is not working. Can someone help to get it work?

[https://kitware.github.io/vtk-js/docs/vtk\_react.html](https://kitware.github.io/vtk-js/docs/vtk_react.html)

 ![image](https://discourse.vtk.org/uploads/default/original/2X/0/0bddf61ad1ea094393e81f5bda938d7b49781377.png)

Thanks,  
zmladen

---

<div class="post-metadata">

### Author: ![Hisham](https://discourse.vtk.org/letter_avatar_proxy/v4/letter/h/f14d63/32.png) [@Hisham](https://discourse.vtk.org/u/Hisham)
#### Post date: [June 27, 2023, 5:30pm UTC](https://discourse.vtk.org/t/using-vtk-with-react/11833/2 "2023-06-27T17:30:04Z")

</div>

I am having the same issue, I followed the same instructions and getting the same error.  
[https://kitware.github.io/vtk-js/docs/vtk\_react.html](https://kitware.github.io/vtk-js/docs/vtk_react.html)

 ![Screenshot from 2023-06-27 19-27-15](https://discourse.vtk.org/uploads/default/original/2X/8/869cbbab2b393732ec1686260143d4f7e9b75778.png).

Can somebody help setting it up?

Thank you  
Hisham

---

<div class="post-metadata">

### Author: ![zmladen](https://discourse.vtk.org/letter_avatar_proxy/v4/letter/z/dfb087/32.png) [@zmladen](https://discourse.vtk.org/u/zmladen)
#### Post date: [July 3, 2023, 8:18am UTC](https://discourse.vtk.org/t/using-vtk-with-react/11833/3 "2023-07-03T08:18:22Z")

</div>

Hello Hisham,

did you manage to solve the issue with vtk?

---

<div class="post-metadata">

### Author: ![Sebastien\_Jourdain](https://discourse.vtk.org/user_avatar/discourse.vtk.org/sebastien_jourdain/32/100_2.png) [@Sebastien\_Jourdain](https://discourse.vtk.org/u/Sebastien_Jourdain)
#### Post date: [July 4, 2023, 5:27pm UTC](https://discourse.vtk.org/t/using-vtk-with-react/11833/4 "2023-07-04T17:27:46Z")

</div>

The doc might be outdated but if you are react developers, it should be obvious on how to fix it.

---

<div class="post-metadata">

### Author: ![Hisham](https://discourse.vtk.org/letter_avatar_proxy/v4/letter/h/f14d63/32.png) [@Hisham](https://discourse.vtk.org/u/Hisham)
#### Post date: [July 8, 2023, 8:09pm UTC](https://discourse.vtk.org/t/using-vtk-with-react/11833/5 "2023-07-08T20:09:23Z")

</div>

Hello Zmladen

Sorry for late response, yes it worked with me as you can see it in the attachment. But I am not really sure why it worked. At first I tried it with a different browser other than Chrome, Firefox to be specific,  
and it worked. Then I tried to play around with the WebOpenGl settings in Chrome and now it is working on both. I guess the runtime error because the vtk js library cannot find the binaries to call at runtime. This could be due to the browser cannot detect the GPU.

I hope this helps.

 ![Screenshot from 2023-07-08 22-04-09](https://discourse.vtk.org/uploads/default/original/2X/a/a18991e619b322ca0545597c93eec19d0e7a3cb6.png)  
a
