Load react bundle dynamically – won’t run

Ask A Question

Login To post a question

So, I have a Jquery App, where I’m loading certain React components on different pages/routes.

For whatever reason, the page that holds the react component, only works upon page refresh. If I click the link sending to the same page again, it will load the react.js bundle, but it’s content won’t be ran. It’s like the react.js does not get called.

I’ve tried replacing location with a simple js file. It worked.
Can it be related to webpack-build?
enter image description here
The page content I am adding this on – is loaded by an ajax request.

enter image description here

For more info please click herehttps://stackoverflow.com/q/50375667

Have a question or need a custom quote?