Good day, I write SPA using React and Django, who made friends with each other using webpack-django-loader and Django REST Framework - Django transfers data via API and processed java-script file with the following code:
async componentDidMount() { try { const res = await fetch('http://127.0.0.1:8000/api/main'); const MainPage = await res.json(); this.setState({MainPage}) } catch (e) { console.log(e); } } Naturally, data rendering takes place on the client side. The question is how to organize server rendering React + Django and what are the approaches as well as best practices?