Using React and Babylonjs efficiency

Hi,
I apologise for a very basic question; I have built a basic scene in Babylonjs using plain javascript and I was wondering if I should start using it with React (and create components instead).
My question is : does the React’s virtual DOM result in any performance penalty over plain javascript when using Babylon ? – just wondering if I should live with the current code or spend time in creating something re-usable (but not at the cost of efficiency).

I hope my question even makes sense :frowning:

Hi dhiru,

First of all, welcome to Babylon! I’m not sure I fully understand what you’re suggesting (I’m not super familiar with React in general), but if it’s a performance question, you might be able to analyze it using Chrome’s built-in performance analysis tools. From what I understand, it should be fairly straightforward to set up a simple scene trying things each way—with and without React—then capture a trace that will allow you to compare the performance between the alternatives. Will that work for your use case?

Thank you for your reply! – yes that will work! – I guess I was just being lazy :frowning: I will need to profile my code and check.
For some reason, mentally I felt with React Creating a Virtual DOM; the code is bound to weaker performance-wise than traditional javascript with no Virtual DOM – was wondering if anyone benchmark anything like this before.

Thanks!