React JS server side rendering with python

10,167

I've been working on python-react-v8, I think it's what you want, it will render react views server side, there are some examples included.

It's built on top of v8-cffi, which embeds V8 into Python, so there is no separate process running.

Also, it is in the same vein as react-rails and react-php-v8js. There was something similiar to this made by facebook, but they deprecated it, hopefully now you can use python-react-v8 instead.

Share:
10,167
Robert Hickok
Author by

Robert Hickok

Updated on June 04, 2022

Comments

  • Robert Hickok
    Robert Hickok almost 2 years

    So I've been looking around for a solution to render React JS components on my server. I use flask and have found a few pieces of software that help with this (https://github.com/markfinger/python-react and https://github.com/defrex/django-react) and I don't really like the idea of having a separate Node process for the render server.

    So I was wondering if I could use something like Pyv8, PyReact, and aysincio to render it server side and have my front end application isomorphic.

    If worse comes to worse I'll use the server render but I feel like it adds a layer of complexity (even though it's not too horrible of a solution) that doesn't really need to be added.