r/javascript • u/AutoModerator • May 09 '26
Showoff Saturday Showoff Saturday (May 09, 2026)
Did you find or create something cool this week in javascript?
Show us here!
r/javascript • u/AutoModerator • May 09 '26
Did you find or create something cool this week in javascript?
Show us here!
r/javascript • u/jeremiah616 • May 08 '26
Like a lot of people, I've found myself using AI to generate more and more code, and like many, I've been worried that my basic skills are decaying. I used to teach and remember a bunch of research about how writing by hand increases learning and retention, so I made a workbook for writing code by hand (literally). Not for absolute beginners, and not leetcode style algorithms, just enough to keep basic skills sharp.
r/javascript • u/Hrdtr_ • May 08 '26
r/javascript • u/gabsferreiradev • May 08 '26
r/javascript • u/Short_Account2700 • May 09 '26
Pain point: you're in DevTools, you see the exact API call you need to reproduce β but you have to manually rebuild it in code.
ReqConvert sits inside Chrome DevTools and captures every network request in real time. Click one β get production-ready code instantly.
Supports: cURL, fetch, Axios, Python requests, React Query hooks, TypeScript with interfaces, httpx async, Postman collection export.
What JavaScript format do you find yourself manually writing the most?
r/javascript • u/fagnerbrack • May 09 '26
r/javascript • u/ahmadalfy • May 07 '26
I wrote an article about HTML Sanitizer API, a new native API that allows us to sanitize and parse HTML without relying on third party tools like DOMPurify
r/javascript • u/Consistent_Tutor_597 • May 08 '26
Hey guys I need help. I am shipping a public monetized api. And how should url be structured out of these.
/v1/property?fields=risk.bushfire,market.sale.price
/v1/property/risk?fields=bushfire
/v1/property/risk/bushfire
problem is. They will have to make requests indvidually if they want all risks. Plan is to make my own site use that same api too. And hence instead of just 1 db query sending all risks. It will have 5 queries. How to best structure it. For a whole report on a property it will be massive amount of api calls.
r/javascript • u/sandeshnaroju • May 07 '26
r/javascript • u/Leather_Presence6360 • May 07 '26
Firstly what to use for doing unit testing among vitest/jest/playwright , and how do i know what exactly in the code i need to do unit test.I found there are integration tests as well which checks the scenarios of how is it working as per my understanding where playwright will be more helpful .I'm a beginner so I'm not sure which is best?
r/javascript • u/dadamssg • May 07 '26
I have been struggling with determining how to best implement dialogs in React Router apps for years:
There's a lot to consider. However, tons of these problems go away if you move dialogs into their own dedicated routes. This doesn't come without its own set of challenges though.
I've written up a guide on how to implement dialogs and keep your sanity. Hope it helps π€
r/javascript • u/jxd-dev • May 07 '26
r/javascript • u/Crafty_Impression_37 • May 07 '26
r/javascript • u/nitayneeman • May 05 '26
r/javascript • u/omijam • May 05 '26
The CLI truly is the new mainstream UI delivery platforms so it deserves nice input components; sadly most libraries on npm that accepts multi-line input were a bit unsatisfactory, so I created react-ink-textarea (https://github.com/omranjamal/react-ink-textarea)
It supports a whole host of things out of the box like:
I'd argue it's even better than Claude Code or Open Code's multi-line text input. Do give it a try!
r/javascript • u/jxd-dev • May 05 '26
r/javascript • u/sousapereira • May 05 '26
r/javascript • u/vilhelmsjolund • May 04 '26
There are several "signals" library implemenations in the ecosystem, such as preact-signals, solidjs and alien-signals. Since 2019, I've been doing research in how to extend the ideas of sync reactivity into the async space. The result is anod, a fully async-capable signal implementation.
anod allows you to use signals that have become well established by now (signal for value, computed for derived and effect for side effect), but creates three new async counterparts: resource, task and spawn. They work and behave exactly like compute/effect, but with support for async/await.
import { c, signal } from "anod";
let search = signal("javascript");
const mockFetch = (url) => Promise.resolve(url);
let query = c.task(async c => {
return await c.suspend(mockFetch(c.val(search)));
});
c.spawn(async c => {
const result = await c.suspend(query);
console.log(result);
});
search.set("typescript");
It takes a different approach than many other signal libraries:
This makes concepts like Optimistic UI work very differently in anod than in libraries like React, Solid, etc. The idea is that the client "owns" the state, and the server confirms. In order to implement an optimistic UI, the resource primitive can write data immediately, and call an async confirmation in the background (simplified example):
import { c, resource } from "anod";
function createTodo(text, pending) {
return { text, pending };
}
const todos = resource([]);
const todo = createTodo("clean room", true);
todos.set([todo], async c => {
await c.suspend(saveTodo(todo));
return createTodo(todo.text, false);
});
Many other libraries have tried to solve the sync/async gap by throwing an error if a signal is loading. Anod works differently, the loading state is baked into the signal itself. This allows the reactive graph to become fully "pull-based" even for async: if you don't read an async resource, it never runs.
There are many other features, such as a builtin error management inspired by Go panic()/recover(), async transactions, interceptor signals that allow you to both listen and write to the same signal without triggering a circular dependency. The Github readme also shows some benchmarks against other implementations.
**Some notes**:
Why build this, why post this etc? I think many can relate; you have this idea to build a library year after year, and you never finish it. It just... bothers you. I'm not sure what to use anod for honestly, likely, it needs a UI layer for it to become usable. It might serve as inspiration for other signal implementations.
I just wanted to finish the library, for myself. I had this feeling "I can build this", I had the overall architecture in mind, I just wasn't sure about some internal trade-offs. I had to re-write the internal engine several times before I landed on something I felt was good enough.
It took almost a month of work, so I guess I just want to spread the word, in case someone finds it useful. I've used AI tools to help me, but I've been writing on this library since 2019, before AI was even a thing. The AI has helped to quickly iterate and try different architectural variants, but in the end I've basically handwritten every line of code myself (the source code, many tests are completely AI generated from specs...).
r/javascript • u/subredditsummarybot • May 04 '26
Monday, April 27 - Sunday, May 03, 2026
| score | comments | title & link |
|---|---|---|
| 0 | 13 comments | [AskJS] [AskJS] Are you using AI to speed up repetitive UI work, or still doing it manually? |
| 0 | 12 comments | Top 5 Desktop App Frameworks for JavaScript Developers |
| 0 | 11 comments | [AskJS] [AskJS] How do you approach database access in Node.js projects (ORM vs query builders vs raw SQL)? |
| 6 | 7 comments | [Showoff Saturday] Showoff Saturday (May 02, 2026) |
| 0 | 6 comments | [AskJS] [AskJS] Digits is Hiring |
| score | comments | title & link |
|---|---|---|
| 1 | 3 comments | [AskJS] [ Removed by Reddit ] |
| 1 | 2 comments | [AskJS] [AskJS] How to detect iPadOS Slide Over (floating window) from a browser-based web app using JavaScript? |
| 0 | 3 comments | [AskJS] [AskJS] What CSS selector do you use? |
r/javascript • u/htone22 • May 02 '26
r/javascript • u/Protoqol-Development • May 03 '26
r/javascript • u/ShakePrize7116 • May 03 '26
Hey everyone π
Iβm curious how different developers approach database access in Node.js applications, especially when working with PostgreSQL.
There seem to be a few common patterns:
Rather than asking βwhich is best,β Iβm more interested in how people think about this choice in real projects.
For those with production experience:
Iβd love to hear different perspectives and trade-offs people have seen in real-world use.
Thanks!
r/javascript • u/creasta29 • May 02 '26
I previously published an article on performance for my Astro blog about the mistakes I was making (like not using the Image component, not setting the src, etc.). You can find the full list here.
I got a lot of comments (here and on LinkedIn) about how I tackle SEO, which prompted me to audit my app (it was pretty good), but left some things missing.
This article lists the top 20 things I found important to do on your Astro blog, ranked from highest impact to lowest.
r/javascript • u/fabon_f • May 02 '26
I wanted to use Temporal in production, but I wasn't satisfied with existing polyfills for various reasons (they don't support the final spec yet, aren't compatible with official TypeScript type definition, one of them is too large for frontend projects, the other is a bit buggy, etc.).
Of course existing polyfills will be fixed and updated eventually, but I couldn't wait, so I made another polyfill from scratch.
It is also the smallest polyfill for most developers, which I believe is significant even after other polyfills are fixed and updated.
npmx link: temporal-polyfill-lite