This may be a stupid question but I'm not a front-end dev so don't know much JS and even less about React.
Our backend system is in Python/Django so I am having to do things in a more involved way than if we were using the Atlassian Connect Express framework.
I am setting up a Jira Connect app and have done the "Hello world" tutorial successfully. I have a page and a webpanel from static HTML just fine. The django backend serves this content in response to the call:
<!DOCTYPE html>
<html lang="en">
<head>
<link rel="stylesheet" href="https://unpkg.com/@atlaskit/css-reset@2.0.0/dist/bundle.css" media="all">
<script src="https://connect-cdn.atl-paas.net/all.js" async></script>
</head>
<body>
<section id="content" class="ac-content">
<h1>Fixed Agile!</h1>
</section>
</body>
</html>
And Jira displays this:

So all the comms are working.
Now I want to go to the next level and start putting together a UI with forms and standard Atlassian components like a badge (https://atlassian.design/components/badge/examples).
The example code for this is:
import React from 'react';
import Badge from '@atlaskit/badge';
const BadgeDefaultExample = () => {
return <Badge>{8}</Badge>;
};
export default BadgeDefaultExample;
But I can't figure out how to supply this from django views to make it display in Jira. And this reflects my fundamental lack of understanding of how react works in the backend/frontend.
Can someone tell me what the contents of a HTML file, that my backend serves, should be to display something like the above? I've tried wrapping it in the head, body, script, etc. but I get just a spinning view in Jira.