React client-side apps not loading on admin pages

Hello,
I am going to add a CMS to my site using editorjs as the front end, and I am trying to add it as a new React app. The app needs to be client-side rendered, and will live in a new admin page I created under /admin. I can’t get any client-side React app to load on this new admin page with prerender:false, not even ManageAvailabilityApp for example. Nor on any other page under /admin. There is no error even when I use an invalid app name.

The app loads successfully in other pages like /admin-old and the listing page so I think the app itself is OK. It looks like the react component is not processed at all on the client side. Is there a setting to bind the app to a path or to include/exclude the React client-side javascript from some routes?

Many thanks,
Rob

Figured it out 20 minutes after posting which was 2 days after hitting the problem! Very simple fix that admin2/admin.js needs to include the generated js files:

//= require vendor-bundle
//= require app-bundle

Will leave this post on here in case it helps someone else in future.

1 Like