Profile avatar
sheek.org
My latest attempt at reinventing the wheel (in JavaScript, naturally). I've seen the future of JS frameworks, and it's...more frameworks. This one will be slightly different (lol). Come watch the inevitable train wreck 🟢Leave your thoughts about anything
489 posts 207 followers 185 following
Regular Contributor
Active Commenter

More syntax churn! 👺🤌 This round's focus > how hard would this thing be to migrate away from? In other words > how portable is my code? I've found that being explicit and slightly verbose works best. Here's the latest for the #frontend #javascript #dev #webdev #buildinpublic

I love dumb code. Dumb code is the best kind of code. #javascript #dev #webdev #programming

You write javascript to open other javascript files to feed them into a javascript build tool to transform javascript content into other javascript so that your server (which you wrote with javascript) can send your javascript client code to the user who...believe it or not...has disabled javascript

#dev #programming #javascript #webdev #code

"Behold... the clusterfuck that is my javascript code from two weeks ago"

Added support for #node_modules in the #frontend shocking, I know 👻 follow the package's own instructions on #npm it won't get bundled into your app (there is no app "bundle") It gets bundled into the module where you use it #javascript #fullstack #dev #node #buildinpublic #backend #webdev

After doing it for the CSS, today I decided to move the JSX for the template out as well 🧩 So Counter.jsx (single function export) Counter.js (single class export) Counter.css (scoped vanilla #CSS) The #template fn can destructor any class prop #javascript #webdev #buildinpublic #frontend #dev

decided to move the #CSS out of js 🤸 I lived with it for a while. I feel it's more beneficial to keep the CSS separate No manual imports. A #css file with the same name as the element's #jsx file will be loaded automatically. The styles are scoped #javascript #frontend #dev #buildinpublic #webdev

Today's 🌶️ take: The `this` keyword is one of the best features of javascript

Spent the day doing a big round of cleanups 🧹 Here's an "app" with 4 routes. index, blog index, counter and blog post I'm starting to see a nice pattern that I like. It's somewhere between SPAs and #MPA. A full-document #SPA ? 🤔 #javascript #frontend #dev #buildinpublic #webdev #performance #web

added preliminary support for defining multiple client-side routes in the same file (with URL param support and capture groups) Moving the element options into the @define decorator args feels cleaner than using static class fields #javascript #routing #webdev #frontend #dev #buildinpublic

A short explainer of the current syntax for creating routes/elements. I feel like this is getting close to something "final" shout if you have any strong feelings #javascript #dev #frontend #buildinpublic #webdev #customelements #jsx #css

put some time aside to clean up #transpilation ⛓️ removed all custom stuff and there's now only two things we transpile - proposal-compliant vanilla js #decorators - #JSX with default transforms replaced #Babel with #esbuild min+br is 11kb 👀 #javascript #nodejs #fullstack #buildinpublic #webdev

I moved `parentMethod` to a decorator ⚡ This separates "framework" code from app code. Plus, it will now throw if you try to access something that does not exist in parents You now use `@parentMethod someMethod` then `this.someMethod()` #javascript #decorator #dev #dx #buildinpublic #webdev

More work on prop drilling. This time for methods⚙️ You can now call any parent method from any nested element like `this.parentMethod.METHOD()` example where a nested element updates the title of a parent. the parent title "state" never leaves it #javascript #frontend #webdev #buildinpublic #dev

Stop using AI generated images as hero/thumbnail/OG image for your articles/blog posts. We can tell. Hire designers. Or just... don't use images. There's nothing wrong with that. K thnx bye.

Noting this from my observations about the "DOGE" website 1. It started as a basic plain HTML/CSS page that everyone can access 2. It got put behind Cloudflare and IPs (VPNs) outside the US just got blocked from accessing it after a few days 3. it now uses Next.js and works even if you use a VPN

Today's 🌶️ take javascript duck typing is a feature, not a bug leave vanillajs alone.

prop-drilling is a PITA 👀 The current setup I have supports flipping that Instead of passing props/methods down through the tree...just "look them up" where you need them This works because I'm using custom elements and the browser DOM #javascript #frontend #webdev #buildinpublic #webcomponents

Spent a bit of time playing with #vdom and I made a thing The previous implementation used to create a full DOM trees and then diff the nodes. It was fast, but nowhere near as fast as vdom renders are down from 8ms to 1ms (500 Nodes) #javascript #dev #frontend #webdev #buildinpublic #performance

Web workers and doing work off main thread🏋️ They work based on messages but I wanted to simplify The worker will lazily import and call the functions for you and you get a non-blocking promise to await await worker.call() #javascript #webdev #dev #frontend #performance #ux #rpc #buildinpublic

Added more built-in routes and some subroutes The Admin route will have things like settings, analytics, and user control The User route will have things like profile, settings, and activity For now, things are basic and rough but I like the flow #javascript #webdev #buildinpublic #dev #frontend

#dev #webdev #frontend #backend #fullstack #javascript #nodejs

#git #gitblame #dev #programming #javascript

While working on user profile page basics, I had to add support for subrouting on the client-side. Luckily, with the URLPattern API, it's as simple as this export const match = '/user/:userId/:tab?' #javascript #frontend #webdev #buildinpublic #navigation #dev

worked on better #RPC #errors 👀 2 places where I want to catch errors. just outside the RPC handler and right before displaying results to users Just throw in the method and it will be caught and logged as is on the server, you get a promise rejection and decide what you show to the user on client

love #SPA, but not soft 404s 🙈 New thing. When a request comes in, match against client routes > server routes > serve hard 404 If #1 matches, serve app Client #routing takes over Repeat on client-side navigation - break out of the SPA with hard 404 #javascript #fullstack #dev #buildinpublic

Progress on routing and styling to make things more polished 🖌️ Strangely enough, I'm starting to see a product come out of all the experiments I put together working on this It's usually product > framework I'm getting framework > product (?) #javascript #frontend #UI #webdev #dev #buildinpublic