Closed baranyildirim closed 2 years ago
Excellent question @baranyildirim, there are sadly very few examples out there, and Hypernova is in itself is looking more and more like abandonware (last update 2 years ago - https://github.com/airbnb/hypernova), and there are few (or if any at all) standalone SSR renders like it. We at Fröjd (the agency that mainly maintain this package) maintained one of our own for a while https://github.com/Frojd/Hastur.
We decided in october to take another approach when it comes to React+SSR and to gradually adopt an integrated clientside/SSR environment like Next.js instead, which of removes the need for DRTT. AirBnb that developed Hypernova did something similar with their Hyperloop project.
But when it comes to examples, we have a older iteration of our Wagtail boilerplate that uses DRTT+Create-React-App and Hypernova, you can find code for it here: https://github.com/airbnb/hypernova
My recommendation is, if you are relying on SSR, try to use a integrated environment such as Next.js or Razzle. I think DRTT hits it's sweet spot for quick client side integrations without SSR rendering.
If a new SSR render like Hypernova arises I would be more than happy to add a adapter for it.
Hey @marteinn thanks for responding. The problem I am facing is I have a Django backend, but need to use React with SSR. This has been a massive headache. I would still like to use Django templates to some extent because I very much dislike react-router and all its variants. At Fröjd did you move away from Django completely?
Totally understand. We have sort of a hybrid approach where we use Next.js to serve any type of user facing frontend, but still maintain a Django backend that has an API that serves content and of course we keep the admin. You can see our current approach here: https://github.com/frojd/wagtail-pipit
I've also worked a lot with Create-React-App and Routing pains. I think Next.js has a better approach where it rather goes by filename instead, its pretty interesting: https://nextjs.org/docs/routing/introduction
Thank you for sharing @marteinn . For now I will continue with Hypernova and try to get hot-reloading to work somehow.
But when it comes to examples, we have a older iteration of our Wagtail boilerplate that uses DRTT+Create-React-App and Hypernova, you can find code for it here: https://github.com/airbnb/hypernova
I would love to see this example if it is public.
NP @baranyildirim. I wish you the best of luck! And if you find a way forward, ping me so I can update our examples.
I would love to see this example if it is public.
For sure! I was supposed to attach a link but somehow forgot, here it is: https://github.com/Frojd/Wagtail-Pipit/tree/c88c981abbc3d284029315bdc672f73c0cf19f47
I'm closing this issue as it is an already answered question.
Not a bug or problem with the project.
Is there a development environment that anyone would recommend for doing frontend development with django-react-templatetags?
Specifically, how do you go about developing react components and debugging them with the Django and Hypernova SSR setup?
Thanks