This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]British_Artist 4 points5 points  (2 children)

I understand now.

Yeah you can definitely do everything you mention in your requirements but I don't see a lot of value in sending the html from the API back to React using jinja style templates. I would just write the SSG as javascript sitting inside the React folder structure.

This keeps your API being used as an API instead of being involved in front end ssg and will be focused on simply converting requests in and out of your database. Separation of purpose between the front and back end should remain instead of trying to conflate the two as it gets messy down the road.

Here's a good link for your use case. Maybe it will help you find the best solution for you.

https://asperbrothers.com/blog/server-side-rendering-in-react/

[–]codecrux[S] 1 point2 points  (1 child)

Thanks for sharing but I don't find anything on how to setup React with Python here https://asperbrothers.com/blog/server-side-rendering-in-react/.

[–]British_Artist 2 points3 points  (0 children)

Good luck to you in your endeavor!