How to return a React.js app as a UI in a template response of a Nextcloud app?

I have a React.js app and I’d like it to be returned as a UI in a template response of a Nextcloud application. Nextcloud’s developer manual only explains how to return a Vue app as an interface. Could someone please make a tutorial on (or just explain) how to integrate a React.js app into a Nextcloud app?

Simply adding the build output js file using addScript should work, Vue is not that much different from react in this regard I think. Additionally, you’ll need a root element that you mount your React app to and you’re good to go.

1 Like