I was trying to complete a React course on Udemy but realised that React (Webpack, Redux, Next, Hooks, etc.) may be an overkill and lead to lot of wasted dev time for my usecase. I have used jQuery previously and the application eventually devolved into spaghetti.
Is there anything better than jQuery but not as complex as react and that integrates well with a backend like Django?
For example instead of $(".button"), you can do document.querySelector(".button"), and so on.
That said, if you must use a framework and looking for something less complicated than react, look into Vue or Svelte.
Bottom line: Use javascript without a library.
Since you're building such a website, a common option for you may be to use a lightweight framework like Svelte/Sapper as your client. I've been using this for most projects with a Django backend.
Also, TailwindCSS is complementary imo.
I think one pro React has is its performance advantage over jquery and handled edge cases. There are some others like Vue or Svelte which could be more performant on other cases but I have bias on React because of its ecosystem, e.g. if I want cute icons I know FontAwesome has its own dedicated react component. Cute charts? Airbnb has visx charting components.
There are, of course, alternatives to React. Angular, Svelte, and Vue are among the most popular. There are even light weight versions such as Alpine. But it’s hard to make any recommendations without understanding your requirements.
htmx allows you to access AJAX, CSS Transitions, WebSockets and Server Sent Events directly in HTML, using attributes, so you can build modern user interfaces with the simplicity and power of hypertext
htmx is small (~9k min.gz'd), dependency-free, extendable & IE11 compatible
I haven’t tested it but it looks interesting and might be going in the direction you are looking for.
Fetch or one of the wrapper libraries has HTTP covered.
Typescript is great if you want everything to work seamlessly on older browsers while using modern JS.
Yeah it's a lot to learn but once you know it, it's just as efficient as the old "JQuery forests + HTML" and way more maintainable.
I did ASP.NET MVC for years and once I learned React + Angular I never looked back. They work just like the desktop UI libraries of old, which is a good thing.
Django and related "server side" frameworks are functionally obsolete unless you have a very static website that needs perfect SEO (ex blog, news site)