as everyone should (imo), i, without knowing better, was doing the most random projects using just vanilla html + js + Express and the vast apis Node.js had to offer
screenshot from my old "rice" on githuboh just how innocent was i
but this continued to be my preferred way of developing for the web with my database being JSON.stringify + fs.writeFileSync
until at some point i was informed about the so-called "React."
i was bound to try it at some point and actually my main reason for doing this is because i saw material ui, the cool ripple effect, how clean it looked and compared to my good ol' bootstrap, which i had picked up, because i saw it being used on a Hack The Box module, it was just better. i had this AI project idea in mind, (spoiler: no i didn't finish it) so i copied that Vite react template and instantly went "whaa where the backend," with not a single idea on what vite is, neither react.
apparently i made it work using vite-express and... axios? at the time i think i
didn't understand the fetch api nor concurrency, i just used .then()
.
my clueless self sticked with his favorite express stack for future projects.
there came a time where i wanted to make my own Minecraft server panel, mostly for fun and because i wanted to have my own and not use somebody else's.
(please don't question my logic, there is none)
oh and by that time something must have gotten into my head, because I WENT CRAZY WITH THE CLASSES like
i can't lie, this is much better than server rendering everything in a huge template string, but it's not the best and also there is ZERO server rendering, nada, everything is fetch abuse.
and also i didn't use websockets for the console
it was literally fetching an endpoint every half second
i'm pretty sure i was addicted to watching Theo yap about react and Next.js, i was semi paying attention to what he's saying
WHATS AN EFFECT AND WHY IS IT BAD
the amount of times he said "better way to do X" got me to actually give next a fair shot
and going through the tutorial made me go
why did i not know this earlier?? this is literally everything i ever wanted
so said project underwent a 5% finished rewrite after i realized next.js middleware is unsupported for nodejs runtime, which to the day i'm writing this, still has mehh support.
but at the time it just DIDNT work and there was no world in which i would put my auth code in layout.tsx and soooo i ended up searching for another framework..
(again please don't question my logic, there is none)
then i discovered Svelte/Kit
the thing i liked most about it was that it really looked like my old vanilla code, but just nicer, way more reusable, with SSR (can't forget the SSR) and form actions.
said project is now feature-complete (sort of, i still have some ideas, but i don't work on it as much)
and around that time i also wrote my site with it
i needed to make an ui for a certain project, which is a sort of video downloader for a... paid course platform ehem
so after more Theo watching i decided to give next one more chance
or the real reason was probably because i saw how nice shadcn/ui is and wanted to try it
all was going well until it wasn't
turns out next doesn't like windows, well windows sucks in general, but STILL
the typescript LSP probably couldn't handle the node process that was sucking every single clock cycle out of my little processor
FYI these are my laptop's specs
it runs way better on Arch Linux
but either i didn't know that and didn't think to try it at the time
so i literally crashed out on react at 3am (sob)
please don't read this
i am wrong about a multitude of things in that "rant"
but atleast that project was sort of finished, so good job me for persevering the terror that was micro$oft windows
UPDATE: as of v15.5, Next.JS has support for using the Node.js middleware runtime :confetti:
and i learned (the hard way) that putting auth in the middleware is the old way to do it
(when you try to use the cookies store in an action while having a middleware, it breaks in builds, but not in dev for some reason?!?!)
and instead you just put it in the server code..
also next is blazingly fast in builds, the difference between dev and build is crazy
dev being slow is probably because of my skill issues (or billy g)
i actually wanted to try my idea with compiling JSX to the traditional vanilla JS way
also i was inspired by Tsodingwell so i did, but didn't get really far
so when things don't work out, you consult your senior professor, ChatGPT
you can find said consulting here
and i was once again reminded that everything that can be built.. is probably already built by someone.
basically Solid.js solves all my issues with React
so far it's looking really promising even though i have zero lines of code written in it
BUT i will be keeping my old projects as is, especially the panel, suffered enough rewrites (sob)
can't wait to use it
web development sucks, we should all just use ImGui with wasm ong
- ivan