Integrate PlayCanvas with React

Hi @Helder and welcome,

There are several ways you can do this:

  • if you are working directly with engine, Playcanvas can be loaded using NPM as a module
  • if you are planning in adding React on top of a Playcanvas editor project, my preferred approach is to iframe the Playcanvas instance and use window.postMessage() to communicate between Playcanvas ↔ React.

Here is a helpful post with example code for the iframe solution:

3 Likes