Preact seems interesting. So my current website is a js mess! I have vanilla js every where (.js files and embeded on the html files) and I want to start organising things without having to go through a huge refactor…

writen by Tiago Ferreira
Honestly, if I was you I would just go for a rewrite. It’s a frontend rewriting your frontend is the way it’s done.

writen by WBE User
I use Hugo which is also a static site generator. But I am using vanilla JS with it. Maybe I should research on what framework people use with Hugo

writen by Tiago Ferreira
you do not necessarily have to change to a framework only because you’re using vanillajs

writen by Benedikt
petite-vue. It’s almost 100% compatible with VueJS, but it’s only 6kb and doesn’t require a built step.

writen by Marc LG
What do you mean by “lighter than react”. Do you mean easier development or faster load times?
Astro is another interesting option. There comparison to other framework docs are nice. https://docs.astro.build/en/comparing-astro-vs-other-tools/#gatsby-vs-astro
Im pretty happy with Next.js which has some optimisations over pure react.

writen by Stephen N
I used to really like knockout.js I haven’t used it in a long time but it’s still around

writen by James Trimble
> Can you point me towards a cool JS framework that is lighter than react but heavier than vanilla javascript? > > I have vanilla js every where (.js files and embeded on the html files) and I want to start organising things without having to go through a huge refactor… This sounds like two different goals to me. If you’re looking to learn a cool JS framework there are gajillions of them! Many mentioned in this thread.
If your goal is to reorganize your existing vanilla JS code, you’re probably looking for something like vanilla JS file/folder structure best practices.
Here are a couple of articles on that (not endorsing everything in here, just scanned through them briefly!):
https://gomakethings.com/how-i-structure-my-javascript-projects-in-2022/
https://javascript.plainenglish.io/the-basic-vanilla-js-project-setup-9290dce6403f
While I personally love React and would recommend learning it or an equivalent, I completely understand that based on where you are right now a re-write may not be in order.

writen by Matt Morris
As Matt said: you do not need a framework for a good website. Just optimizing a bit for the platform, performance and structure should be sufficient.
Unless you want to learn/practice a framework

writen by Benedikt
react.production.min.js is 4.6 kB react-dom.production.min.js is 43.7 kB the size of the bundle shouldn’t be a problem

writen by Luca Restagno (ikoichi on Twitter)
Matt Morris and Benedikt you are absolutely right. My question was more structure oriented than framework oriented. However, there are certain features I need (like quick list filter + re-render) where I believe a framework like react could really help.

writen by Tiago Ferreira