Hacker News new | ask | show | jobs
by burnbabyburn 3422 days ago
I've been using react for various components inside a somewhat standard django application through https://github.com/owais/django-webpack-loader . It works by having your webpack pipeline spit a webpack-stats.json that a django's template tag reads and uses to output things in your template.

The setup is not really straight forward, and generally I have problems mixing django static files in my .scss url() , so this is far from perfect. I'm using it with a main .ts file that requires various components based on the class of body tag, so I can use this in simple reload request use case. Also I've complicated things a little so my webpack bundles are collected as other static files and my static template tag also works.

But yeah, using react in typescript and sass in this way for the frontend has accelerated my development a lot.