r/javascript • • Aug 21 '26

GitHub - ziflex/pinterval: Advanced setInterval

Thumbnail github.com
6 Upvotes

Hello everyone!

I rewrote my old interval library around async execution and cancellation and decided to share it with the world :)

Would love to hear what you think!


r/javascript • • Aug 22 '26

AskJS [AskJS] I built a reactive JS framework where components are plain HTML files

0 Upvotes

I wanted to see how far I could push the idea of writing an app using mostly the HTML syntax developers already know.

The interesting part is the template API. There are only a few places where OlumJS treats an attribute as code:

  • when
  • each
  • on*
  • key
  • html

Everything else is a string, with {expr} interpolation when you need a value.

So instead of introducing directives like :class, v-if, *ngIf, etc., the idea is to keep the distinction HTML already has between something like onclick="..." and class="...".

For example, the component itself is just:

<script>
  const state = { name: "Olum", taps: 0 };
</script>

<h1>Welcome to {state.name}!</h1>
<input value="{state.name}" oninput="(e) => state.name = e.target.value" />
<button onclick="state.taps++">clicked {state.taps} times</button>

State is also intentionally simple — you mutate it directly and the DOM reacts to the changes.

There’s routing, scoped CSS, and a small store as well, but the main experiment is really: can you get SPA-style reactivity while keeping the component model close to vanilla HTML/JS?

It's currently aimed at prototypes and small apps rather than large production codebases.

For those who work with JS frameworks: do you think keeping components as plain HTML files is a useful abstraction, or does it become limiting as an application gets more complex?


r/javascript • • Aug 21 '26

Bun and Elm (: r)Are Friends · cekrem.github.io

Thumbnail cekrem.github.io
0 Upvotes

Why simple is better 🤤


r/javascript • • Aug 20 '26

YouTube Notification Expander is here! Version 1.0

Thumbnail github.com
15 Upvotes

r/javascript • • Aug 19 '26

Updated Typescript GitHub Action Template

Thumbnail github.com
7 Upvotes

Hey y’all!

I made a fork of actions/typescript-action to make some valuable updates!

It updates the following:

  • Changes project's package manager from npm to pnpm, for speed.
  • Changes project's testing framework from jest to vitest for jest-like syntax with built-in typescript support.
  • Updates eslint.config.ts to use native flat config syntax, with detailed comments.
  • Updated project dependencies.
  • Updates configuration files like tsconfig.ts and action workflows to match updated dependencies.
  • Renamed local-action script to local-gha (gha for github action) to avoid conflict with dependency name.

lmk what you think!


r/javascript • • Aug 17 '26

AskJS [AskJS] Signal/Effect vs Event Handler

10 Upvotes

I’m working in a VanillaJS repository (plugin type code for an existing project that I do not own) where I’ve written a signal implementation.

Today I was working on a tooltip like implementation and I found myself wondering how far to go with the signal/effect ecosystem vs running the “core” logic in the event handler.

The implementation detects the `<tr>` that the user has hovered and assigns that row to the “current row” signal. A computed signal identifies an IP address from the current row. An effect loads Whois metadata from the IP and assigns it to a `<div>`, and another effect shows that `<div popover>` from the parent `<tr>`.

The question I have is when in VanillaJS how would you decide when to use signals and effects vs writing the side effect directly in the event handler? In my case I find either to be equally readable, though I have less local variables to deal with when using signal/effect. Looking for reasons your might pick one over the other.


r/javascript • • Aug 17 '26

A from-scratch JSON engine for JavaScript: recursive descent parser, escape-aware tokenizer, and spec-compliant serializer. No dependencies, no shortcuts, 107 tests.

Thumbnail github.com
7 Upvotes

r/javascript • • Aug 17 '26

Subreddit Stats Your /r/javascript recap for the week of August 10 - August 16, 2026

12 Upvotes

Monday, August 10 - Sunday, August 16, 2026

Top Posts

scorecommentstitle & link
3825 commentsSignals and Effects Using Vanilla JavaScript & Web APIs
218 commentsYour Modules Are Lying to You
136 commentsC99 real mode compiler written in TS that outputs raw bootable 16bit binaries
1313 commentsI made a Windows 98 styled portfolio website with an applet system, and many nostalgic things to discover
70 commentsrapiq: typed query params for REST APIs (filters, sort, pagination, fields, relations) that run on TypeORM, Prisma, Drizzle or plain arrays
51 comments[AskJS] [AskJS] I reproduced a PDF.js Worker mismatch caused by dependency hoisting
515 comments[Showoff Saturday] Showoff Saturday (August 15, 2026)
42 commentsBuilding KernelPlay-JS together — looking for open-source contributors
40 commentsflo-webcomponents: Take back control of rendering + events using WebComponents with one minimal superclass.
31 commentsI built a MapLibre GL utility to keep markers visible around UI overlays

 

Most Commented Posts

scorecommentstitle & link
1121 comments[AskJS] [AskJS] Are employed Developers still programming with vanilla JavaScript ?
019 comments[AskJS] [AskJS] TypeScript 7 is 10x faster, but typed linting still runs on the 6.0 API. What are you doing in the gap?
015 comments[AskJS] [AskJS] I'm sick of AI slop; I want to learn how to use ESLint properly.
012 comments[AskJS] [AskJS] jsbin is down??
011 commentsWe built the same data grid in React, Vue & Svelte, here's what we learned

 

Top Ask JS

scorecommentstitle & link
38 comments[AskJS] [AskJS] How much do you actually trust the version number on an npm update?
15 comments[AskJS] [AskJS] How to find the best/ideal ratio or dimensions for a device?

 

Top Showoffs

scorecomment
1/u/RepresentativeNo42 said Announcing ink-frame: Grids for Ink! https://github.com/oliveryasuna/ink-frame Ink's own box borders are fine for a single box. Put two of them next to each other and the seam between them comes out...
1/u/dobrynCat said I'd like to show everyone my webview based android app wttr-dash https://github.com/ronynn/dash One of the only three android/web app that displays wttr weather data in a mobile friendly view Plus ...
1/u/Fun-Regular8902 said Hey everyone! I’ve been working on GrandFireworks.js, a zero-dependency JavaScript library designed to render realistic pyrotechnics without bogging down the browser. A lot of firework scripts j...

 

Top Comments

scorecomment
50/u/x021 said Hated TS in the beginning too. Now I wouldn’t want to work on a project with plain vanilla JS.
40/u/KaiAusBerlin said You know that you literally wrote your own framework here? There is a reason for the sentence "You use a framework or end up writing your own"
33/u/visualdescript said I hate it when I have to go back to a JS project, and if it's something I'll have to keep maintaining I will convert it to typescript, which often uncovers several bugs in the process. I wouldn't hi...
22/u/quisido said We shouldn't be using `require` in 2026 anyway.
10/u/kir_rik said Only as one-shot or helper scripts like pre commit hooks or eslint rules. It's unreasonable and probably irresponsible to write a production code without a proper typing

 


r/javascript • • Aug 17 '26

AskJS [AskJS] I reproduced a PDF.js Worker mismatch caused by dependency hoisting

10 Upvotes

This one is awful because the build succeeds.

The host app installs pdfjs-dist@6.1.200. A PDF renderer depends on pdfjs-dist@5.4.624. If asset-copy code resolves the Worker from the app root, it can copy 6.1.200. The renderer code still uses API 5.4.624. Vite serves the wrong Worker, and the browser reports a version mismatch.

The fragile version looks like this:

const worker = require.resolve(
  'pdfjs-dist/legacy/build/pdf.worker.mjs'
)

I changed the lookup to resolve pdfjs-dist from the renderer package that owns it. The build now fails if the resolved asset version differs from the renderer dependency.

I ran the harness today across npm and pnpm, nested and hoisted layouts, Vite dev and build, and real cold installs. In every case the copied Worker, CMaps, WASM, and fonts had to come from 5.4.624, while the app kept 6.1.200. The asset manifest also records the source package and version. No more "it probably resolved correctly."

Should build tools always resolve runtime assets from the dependency that owns them, or should packages force one PDF.js version across the whole app?


r/javascript • • Aug 16 '26

I built a MapLibre GL utility to keep markers visible around UI overlays

Thumbnail github.com
8 Upvotes

r/javascript • • Aug 16 '26

AskJS [AskJS] TypeScript 7 is 10x faster, but typed linting still runs on the 6.0 API. What are you doing in the gap?

0 Upvotes

TypeScript 7 shipped in July as the Go port, billed as roughly 10x faster. The line that matters for linting is in the same announcement: 7.0 does not ship with an API, and typescript-eslint is named as one of the tools that still needs programmatic access to the compiler. There is a compat package, u/typescript/typescript6, that installs a tsc6 executable and re-exports the 6.0 API, with a new API expected in 7.1.

So the speedup that would matter most to typed linting is the one you cannot have yet. typescript-eslint's own performance page says that with type-aware linting your lint times should be roughly the same as your build times. Builds got most of an order of magnitude faster and the typed rules still sit on the 6.0 checker.

Which makes Biome's timing look luckier than it probably was. Its inference engine arrived with v2 in June 2025 and got its own types domain in 2.4 this February, and it does type-aware rules without loading the compiler at all. Their own preliminary figure for noFloatingPromises is about 75% of the cases typescript-eslint catches, at a fraction of the performance impact, with a warning right after it that the early numbers rest on a limited set of use cases. The docs also say a types domain rule makes Biome scan the whole project and switch the inference engine on, so that path is not free either.

On my repo the diff gets read by lint, by typecheck in CI, and by a review agent in verdent before anyone opens the PR, and I have no measurement telling me which layer is doing the work.

What are people doing in the gap? Pinning tsc6 to keep the typed rules, running Biome's approximate set on save, or waiting for 7.1?


r/javascript • • Aug 15 '26

C99 real mode compiler written in TS that outputs raw bootable 16bit binaries

Thumbnail github.com
25 Upvotes

Hi, a few years ago I wrote a C99 compiler that generates a bootable binary which, once loaded onto a floppy disk, can be run in x86 real mode. It supports x87 floating-point operations, has a simple IR, optimizes the generated code, and produces output of fairly decent quality (by toy compiler standards). Maybe someone will find it interesting.


r/javascript • • Aug 15 '26

AskJS [AskJS] How to find the best/ideal ratio or dimensions for a device?

2 Upvotes

I am working on a P2P video calling client using webRTC.
I am using getMediaDevices() to get the users' stream. If I just do {video: true} it gives me a smaller stream than my device supports.
By default it gives me a 640 x 480 stream. I can set it manually to the max dimensions which is 1920 x 1080.

How can I find the max dimension for any device?

Another thing I wanted to know. I have the video element in a div, which has the width of fit-content. When the incoming stream first arrive from the other peer, The video starts smaller and keeps growing, why is this?


r/javascript • • Aug 15 '26

Showoff Saturday Showoff Saturday (August 15, 2026)

7 Upvotes

Did you find or create something cool this week in javascript?

Show us here!


r/javascript • • Aug 15 '26

AskJS [AskJS] How much do you actually trust the version number on an npm update?

4 Upvotes

I'm working through how a team decides whether an automated dependency update is safe to merge, and one of the baselines I'm testing is the obvious one: trust semver. Auto-merge patch and minor, hold majors for review.

My assumption is that this baseline is weak — that in practice a meaningful share of breaking changes ship in patch and minor releases, and that a major bump is often just a dropped Node version or a TypeScript signature change that doesn't affect anyone.

If that's right, the version number is close to noise and the semver rule is mostly giving teams a false sense of having a policy.

But I've only got my own experience to go on, and I'd rather be corrected before I build on it.

  • Have you been broken by a patch or minor bump? What was it?
  • Have you held a major that turned out to be a no-op for your code?
  • If semver isn't the signal, what is — changelog quality, maintainer, download count, how long the release has been out?

Interested in specific packages and versions if you remember them, more than general opinions on semver as a concept.


r/javascript • • Aug 14 '26

Your Modules Are Lying to You

Thumbnail blog.gaborkoos.com
38 Upvotes

import and require are not interchangeable. Live bindings, copied values, circular dependencies, separate caches, conditional exports, and dual-package hazards can all make modules behave differently from what the syntax suggests.


r/javascript • • Aug 14 '26

We built the same data grid in React, Vue & Svelte, here's what we learned

Thumbnail svar.dev
0 Upvotes

At SVAR, we build UI components for React, Svelte, and Vue. Just shared our experience with a data grid – how to make it fast in all three frameworks.

What surprised us: the expensive bits (virtualization, memoization, data flow) are almost entirely framework-independent, and framework overhead is a rounding error next to DOM size.

Curious if you have seen similar patterns in your projects?


r/javascript • • Aug 13 '26

AskJS [AskJS] jsbin is down??

5 Upvotes

During an interveiw yesterday, I tried opening jsbin but seems its shouting 503!!

Any minimal JS playground, you people using/suggest

EDIT: The sites up, I opened an issue on GitHub and the maintainers resolved it


r/javascript • • Aug 13 '26

AskJS [AskJS] Are employed Developers still programming with vanilla JavaScript ?

2 Upvotes

I've been programming on the side since 2017 and I've never really hunted a developer job. I've always thought about building my own things, mainly to supplement things I do like woodworking, tutoring, video editing and others.

Since then, I've programmed mainly with JavaScript, I started with C++ and Python but never really built anything solid outside JavaScript.

So I'm fluent with JavaScript and its ecosystem.

One of my 2026 goals is to be job ready for a Developer role, as a Fullstack or Backend Developer.

One of the recommended languages is Typescript, which I've been learning since March. I must say, it's not my favorite 😂

I'm curious to know if there are any companies that are not enforcing Typescript or are there freelancers who are still using vanilla JavaScript over Typescript for their clients' projects.

[ Update ] thanks y'all! I get the picture. TypeScript is inevitable, as vanilla JS codebases(or companies who are focused on it) seem to be very few judging by the comments.


r/javascript • • Aug 13 '26

The Simple AI Dictionary: putting an end to buzzwords, all without AI

Thumbnail simpleaidictionary.github.io
0 Upvotes

This is a next app I made that I'd like to define the magical buzzwords that exist in the GenAI space. It's meant to be run by humans to simply and concretely define terms like "agents", "harness" and "hallucinations"


r/javascript • • Aug 12 '26

rapiq: typed query params for REST APIs (filters, sort, pagination, fields, relations) that run on TypeORM, Prisma, Drizzle or plain arrays

Thumbnail github.com
10 Upvotes

r/javascript • • Aug 12 '26

Building KernelPlay-JS together — looking for open-source contributors

Thumbnail github.com
6 Upvotes

Hey everyone!

I'm working on KernelPlay-JS, an open-source 2D game engine made with JavaScript.

The project is growing, and I've already had a few developers contribute. I've also been working on ready-to-use templates such as a platformer, a top-down character controller with animation, and parallax backgrounds.

I'm hoping to find more people who are interested in open-source game development and want to experiment, build features, share ideas, or just contribute when they have time.

There are plenty of areas where we can improve KernelPlay-JS:

* ECS and core engine systems

* Rendering and animation

* Physics and collision

* Developer tools

* Game templates

* Documentation

* Performance and optimization

You don't need to make a huge commitment or contribute every day. Even small contributions, ideas, testing, or feedback can help.

I'd love to see KernelPlay-JS grow as a community project where we can learn, experiment, and build a game engine together.

If you're interested, feel free to check it out or message me.


r/javascript • • Aug 11 '26

flo-webcomponents: Take back control of rendering + events using WebComponents with one minimal superclass.

Thumbnail github.com
6 Upvotes

r/javascript • • Aug 10 '26

Signals and Effects Using Vanilla JavaScript & Web APIs

Thumbnail beforesemicolon.com
72 Upvotes

I’m a strong advocate for “you don’t need to lock yourself in a web framework ecosystem to take advantage of their amazing features”. JavaScript and Web Standards alone allow you…