r/javascript • u/deb_91 • Aug 25 '26
AskJS [AskJS] Can someone provide me Roadmap to be become an AI specialist.
Please provide some stories that has worked for you. I want to start from basics.
r/javascript • u/deb_91 • Aug 25 '26
Please provide some stories that has worked for you. I want to start from basics.
r/javascript • u/Landkey • Aug 25 '26
How do you all refer to parent or grandparent (or related) class instances and their properties?
I have a bunch of classes that create instances of other classes as properties. Suppose ClassA has properties that are instances of ClassB, ClassC, and ClassD, and the ClassD class has properties ClassD1 through ClassD9, and each of those is a different class instance with various methods.
Currently, when I start with myClassAObject and I call one of its ClassD9 methods and that method needs a property from its uncle ClassB, I feel awkward and/or dumb for doing this by passing myClassAObject to that method:
const returnval = myClassAObject.itsClassDObject.theClassD9method(myClassAObject);
ā¦and then that method gets the property from myClassAObject.itsClassBObject.theProperty
I know this functions, but it shouts āinelegantā every time I do it. Do yāall know a more elegant way? TIA
r/javascript • u/Safe_Scientist5872 • Aug 24 '26
r/javascript • u/lukehaas • Aug 24 '26
r/javascript • u/moving808s • Aug 24 '26
Project GoldScript is a tactical RPG engine I have been building in the open for over a decade. Itās composed of a a web stack (with three.js and react under the hood) aimed at shipping a real game to Steam, mobile and consoles. This year I finally did the migration I had been putting off: two aging create-react-app repos (engine in one, game in the other) collapsed into a single pnpm and Vite monorepo, with the engine broken into eleven focused packages that are guarded against circular dependencies.
r/javascript • u/subredditsummarybot • Aug 24 '26
Monday, August 17 - Sunday, August 23, 2026
| score | comments | title & link |
|---|---|---|
| 67 | 28 comments | [AskJS] [AskJS] Our app didn't leak memory,it leaked memory four hundred modals later |
| 48 | 9 comments | How an Underrated Refactor Saved 90% Memory Usage |
| 15 | 21 comments | Made a small library called strokes.js. |
| 12 | 2 comments | [Subreddit Stats] Your /r/javascript recap for the week of August 10 - August 16, 2026 |
| 11 | 2 comments | The Structured Clone Algorithm: What JavaScript Can and Cannot Move Between Boundaries |
| 10 | 5 comments | YouTube Notification Expander is here! Version 1.0 |
| 10 | 13 comments | [AskJS] [AskJS] Signal/Effect vs Event Handler |
| 8 | 0 comments | React Native 0.87, Instant Paywall A/B Testing, and Buying Mike Hardy a Beer |
| 7 | 0 comments | Updated Typescript GitHub Action Template |
| 5 | 0 comments | Bringing Type1 support to Opentype.js |
Ā
| score | comments | title & link |
|---|---|---|
| 0 | 39 comments | LilScript makes js modules 20% smaller |
| 5 | 28 comments | A from-scratch JSON engine for JavaScript: recursive descent parser, escape-aware tokenizer, and spec-compliant serializer. No dependencies, no shortcuts, 107 tests. |
| 0 | 19 comments | [AskJS] [AskJS] I built a reactive JS framework where components are plain HTML files |
| 4 | 12 comments | [Showoff Saturday] Showoff Saturday (August 22, 2026) |
| 0 | 4 comments | Cerious-Scroll v1.1.0 adds Masonry layouts with Dynamic Heights |
Ā
Ā
Ā
r/javascript • u/EveYogaTech • Aug 24 '26
r/javascript • u/fagnerbrack • Aug 23 '26
r/javascript • u/Suitable_Language_37 • Aug 23 '26
r/javascript • u/Decent-Blacksmith761 • Aug 22 '26
If anyone is interested in reviewing and approving PFA and PFB support i tried to bring to opentype.js check my pull it will give more chances to get approval on merge.
r/javascript • u/OtherwisePush6424 • Aug 22 '26
I posted an earlier version of ffetch here a while ago. I've continued working on it, and it has grown into a production-ready, TypeScript-first drop-in replacement for native fetch or any fetch-compatible implementation.
It preserves the familiar fetch API and native Request and Response objects while adding resilience features:
It also has optional convenience plugins for:
client.get(), .post(), .put(), .patch() and .delete()client(url).json(), .text() and .blob()The core also supports lifecycle hooks, per-request overrides, pending-request monitoring, configurable HTTP error handling, specific error classes, and custom fetch implementations for SSR, edge and framework environments.
Everything optional is implemented through tree-shakeable plugins, so you only include the features you need. The core is around 3 kB minified and has zero runtime dependencies.
I recently gave the project a substantial maintenance pass: extensive property-based and fuzz testing, hardened and pinned CI workflows, CodeQL analysis, dependency auditing, npm provenance, release SBOMs, and a strong OpenSSF Scorecard (for a solo project).
I've also built three related tools for injecting network failures into tests:
fetch, without running a proxyDepending on the tests, failures can be injected inside the process, through a Node.js proxy, or through a standalone Go proxy.
Feedback is welcome.
r/javascript • u/jhnam88 • Aug 22 '26
/**
* @evidence docs/discount.md#coupon-stacking States the per-issuer stacking limit this section defines, in the buyer's words.
* @evidence POST:/orders/{orderId}/coupons Explains the rejection this endpoint returns for an over-stacked coupon set.
* @evidence {@link hooks.useCouponStacking} Renders the limit this hook resolves.
* @evidence docs/principles.md#no-hard-coding Renders limits from props instead of branching on known issuer names.
* @evidenceExclude docs/principles.md#fix-root-causes-not-symptoms No failure to fix.
*/
export function CouponStackingNotice(props: IProps): JSX.Element;
I built Evidence Graph, a compiler rule that turns requirements skipped by coding agents into compile errors.
You declare which code, tests, schemas, or documents owe which specification units. The agent must cite each unit and state why the artifact satisfies it. Checklist mode can also require every selected function to answer project-wide principles such as "No hard coding" and "Fix root causes."
This does not make the agent's statements automatically true. It makes omissions mechanically detectable and narrows human review to checking the truth of explicit claims. Reviews carry fingerprints that expire when the cited content changes.
I tested it on four frozen application tasks. Plain runs covered 51.6-85.5% of the predefined requirement edges; Evidence Graph runs covered 100% while using 4.8-13.3x fewer tokens.
r/javascript • u/Right-Principle-4877 • Aug 22 '26
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:
wheneachon*keyhtmlEverything 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 • u/inc_23 • Aug 22 '26
Made a small library called strokes.js. Instead of using a "handwriting" webfont (which looks identical everywhere it's used), it renders each letter as an actual hand-drawn SVG path ā real strokes, drawn in with stroke-dashoffset, with small random variation (rotation, baseline drift, glyph variants) so no two renders of the same word look identical.
Demo: https://a-elhaag.github.io/glyphed.js/
npm:
npm install glyphed.jsr/javascript • u/AutoModerator • Aug 22 '26
Did you find or create something cool this week in javascript?
Show us here!
r/javascript • u/OtherwisePush6424 • Aug 22 '26
structuredClone() preserves more than JSON, but class instances, proxies, getters, errors, and transferables still have surprising behaviour. This article covers what survives, what changes, and what throws.
r/javascript • u/ziflex • Aug 21 '26
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 • u/cekrem • Aug 21 '26
Why simple is better š¤¤
r/javascript • u/DiodeInc • Aug 20 '26
r/javascript • u/Ahmed33033 • Aug 19 '26
Hey yāall!
I made a fork of actions/typescript-action to make some valuable updates!
It updates the following:
local-actionĀ script toĀ local-ghaĀ (gha for github action) to avoid conflict with dependency name.lmk what you think!
r/javascript • u/Forward_Dark_7305 • Aug 17 '26
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 • u/Mantas_rst • Aug 17 '26
r/javascript • u/subredditsummarybot • Aug 17 '26
Monday, August 10 - Sunday, August 16, 2026
Ā
| score | comments | title & link |
|---|---|---|
| 1 | 121 comments | [AskJS] [AskJS] Are employed Developers still programming with vanilla JavaScript ? |
| 0 | 19 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? |
| 0 | 15 comments | [AskJS] [AskJS] I'm sick of AI slop; I want to learn how to use ESLint properly. |
| 0 | 12 comments | [AskJS] [AskJS] jsbin is down?? |
| 0 | 11 comments | We built the same data grid in React, Vue & Svelte, here's what we learned |
Ā
| score | comments | title & link |
|---|---|---|
| 3 | 8 comments | [AskJS] [AskJS] How much do you actually trust the version number on an npm update? |
| 1 | 5 comments | [AskJS] [AskJS] How to find the best/ideal ratio or dimensions for a device? |
Ā
Ā
Ā
r/javascript • u/Wooden-Bicycle-6069 • Aug 17 '26
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.
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?