0

I am trying to integrate a React frontend into my Django project. I'm using Babel (ver 7.22) and webpack to bundle everything into index-bundle.js Currently, the index-bundle.js file is being fetched (according to the GET requests in terminal), but nothing is being loaded into the actual Django template. When I inspect the page, there is nothing from the js file being loaded. Everything was working until I tried adding in react components, but now nothing is working at all.

File structure:

-myproject
 --frontend
  ---index.js
  ---App.js
 --static
  ---css
  ---js
  ---index-bundle.js
 --templates

my idex.js is literally just

ReactDOM.render(<h1>help</h1>, document.getElementById("root"))

I've already ensured that the template is loading the index-bundle.js file and has

<div id="root"></div>
smd21
  • 1
  • 1

0 Answers0