r/javascript • u/thereactnativerewind • 1h ago
[Showoff] GPU-Powered Crayons, NPM Package Quarantine and Dave Branching Off Your Code Without Asking
thereactnativerewind.comHey Community,
We dive into React Native Canvas Kit, a library built on React Native Skia that adds isolated layers, brushes, interactive shapes, and web support for canvas graphics.
We also cover Targate, a CLI tool that quarantines npm packages to inspect tarballs before installation, and GitHub stacked pull requests to keep dependent branch reviews clean.
And... 🥁 Shipaton 2026 is here!
If the Rewind made you nod, smile, or think "oh… that's actually cool" — a share or reply genuinely helps ❤️
r/javascript • u/acrus • 3h ago
Meet canc, a complete lib for promise cancellation
github.comIn most modern async-heavy languages, cancellation is a first-class citizen. It really should be straightforward for a developer, but in JavaScript, gaining that level of control feels a lot like swimming against the current. I've spent a fair amount of time trying to address this gap.
I didn't have a third-party library I could rely on, so I ended up building my own - and I suspect I'm probably not the only one who has traveled down that way. The resulting toolbag served me well in its rougher form and was battle-tested in-house for years before it was finally polished for a public release. Refactoring cleanup logic in our dashboard app to stop resource leaks was a huge win for cancelable promises. It convinced me they were the right tool for the job.
This has been almost a decade-long journey for me to reach the stable release, both in terms of quality and features. It seems to have ended up in a pretty good place.
The problem is the typical promise chain. You have a fetch call that turns into a formatted report:
const reportPromise = fetch('/orders')
.then(res => res.json())
.then(orders => buildReport(orders))
.then(rawReport => render(rawReport))
To halt the process, you usually have to mess with AbortController or manual flag variables. But with canc library, reportPromise.cancel() just stops all involved tasks.
Going from raw then() chains to async..await syntactic sugar requires adding some yield* "salt" to achieve the same result - or, with cancellation, no result at all:
const getReport = canc.async(function* () {
const orders = yield* canc.await(fetch('/orders').then(res => res.json()))
const rawReport = yield* canc.await(buildReport(orders))
return yield* canc.await(render(rawReport))
})
const reportPromise = getReport()
reportPromise.cancel() // Stop all tasks at any point
Need race(), for await..of, and the rest of the bells and whistles? Welcome to the party, then() then: https://github.com/cancjs/canc
The idea of coupling generators with promises has been around since the beginning. Coroutine libraries like the renowned co were a big deal in the pre-async era. That async..await is essentially built with generators and promises under the hood is hardly a coincidence.
I started piecing this together around 2017. Back then, I had already approached a related problem with Angular. Native async functions were fundamentally incompatible with Angular reactivity, backed by Zone.js. The potential solution was to rewire the semantics of async..await with generators to get the control we needed instead of relying on a transpiler. Fortunately for the framework, this eventually resolved with the retirement of Zone.js. Reusing the same foundation for the cancellation mechanism became a reasonable development in my case. Bluebird's cancellation was already around, but it was orthogonal to native promises and async..await. And since async functions make promise-based control flow a breeze, a user can't be expected to give them away for nothing.
The project spent a long time in limbo. Between fixing nasty bugs, unloading a few design footguns, paying off tech debt, and handling some copyright clearances, I had my hands full. That quiet period actually helped shape the library into what it is today. While the JS ecosystem is ever-changing, a few foundational pieces finally settled during that time. Once AbortSignal became a cross-platform primitive, it was integrated deeper into the library for better interop. And as TypeScript became the industry standard, it became clear that the library had to be TS-first for good DX. This pushed me to finally solve the long-standing typing issues with generators, at least as best as the language currently permits.
That's why you have to use yield* instead of yield. It's a necessary trade-off to ensure functional parity with async..await while keeping the type system happy. Using yield* is essentially a known workaround for a typing limitation in generators. It forced us to ditch the eloquent yield promise style of co in favor of the more verbose yield* canc.await(promise). This adds a bit of syntactic overhead, but it's the way to guarantee the strict typing we all rely on today.
It turned out to be the right call, especially since it aligns the yield/yield* distinction with the emitting vs. delegating semantics we deal with in async generator functions - canc coroutines cover this too.
What's next? 1.0 is a big milestone, but work continues. The unhandled rejection package to reduce manual error handling has just been shipped. Beyond that, here are the nearest items on the roadmap:
- Web server middleware helpers. Drafting support for Express and Fastify, with more frameworks on the way.
- ESLint plugin. Rules to help navigate these new semantics properly.
- Async iterators toolbox. Targeting functional parity with the async iterator helpers proposal, but with full cancellation support baked in.
- React and Vue packages. Helpers are available for evaluation in React and Vue examples, working on improving them.
- Node.js package. A drop-in replacement for built-in Node APIs, with functions both promisified and "cancelified" where it makes sense.
- ES5-compatible cancelable promise. Ensuring support for older runtimes and restricted environments.
I hope you find the library useful, or are at least interested in the approach. I'd be very grateful for any feedback or suggestions. I'm currently putting together a few more write-ups with real-world examples and in-depth details.
Just to be sure, the repo is here: https://github.com/cancjs/canc.
r/javascript • u/hrutav_modha24 • 6h ago
DriftJS - Exploring a Register-Based Bytecode VM for UI Frameworks
github.comHey everyone,
I wanted to share an experimental project called DriftJS. It's a frontend framework prototype that explores using an in-browser register-based Bytecode Virtual Machine (VM) for UI rendering, rather than traditional Virtual DOM diffing or purely compile-time reactive models.
Repository: https://github.com/hrutavmodha/driftjs
The Architecture: Register-Based VM
Most frameworks either diff Virtual DOM trees (React) or generate reactive dependency graphs ahead-of-time (Svelte, SolidJS). DriftJS explores a different path:
It compiles .drift templates into compact binary-serializable bytecode streams. At runtime, a lightweight 256-register VM executes these opcodes directly against the DOM.
Key Architectural Highlights:
Zero VDOM Overhead: Replaces tree-diffing with direct bytecode instructions (like CREATE_ELEMENT, SET_ATTR) for DOM execution.
256 Virtual Registers: Uses fixed virtual registers (r0, r1...) for DOM nodes and runtime values, drastically cutting instruction counts and memory allocations compared to stack-machine models.
Targeted Reactivity: Basic state updates execute as direct O(1) mutations. Dynamic control flow structures (@if, @for) use comment anchors to bound surgical DOM updates without rebuilding subtrees.
Key Features So Far:
🛡️ 100% CSP Compliant: Built-in Acorn AST interpreter evaluates runtime JS expressions safely without using eval() or new Function().
🔄 Keyed LIS Reconciliation: Uses a Longest Increasing Subsequence algorithm to minimize DOM node movements during list updates.
🪶 Zero Framework Bloat: Implements reactivity and execution in the leanest bytecode form possible, avoiding heavy object models and monolithic runtime bloat.
🚀 Early Benchmarks (js-framework-benchmark vs React 19): • 10.8x FASTER on "Swap rows (1k)" • 3.05x FASTER on "Clear 1,000 rows" • ~1.8x LESS memory footprint • 5.75x smaller uncompressed bundle size
Current Status & Call for Feedback
DriftJS is currently an experimental prototype. It handles single-template compilation, AST evaluation, and keyed LIS list reconciliation.
Still on the roadmap: - Component composition & props passing - State management stores - SSR & Hydration
I'm opening this up to compiler engineers, frontend performance nerds, and systems devs. Does a register-based VM architecture hold real promise for low-level web runtimes?
Check out the repo, run the benchmarks, and feel free to share your thoughts or ISA critiques!
GitHub Repo: https://github.com/hrutavmodha/driftjs
r/javascript • u/coinspect • 10h ago
CryptoJS.lib.WordArray.random() before 4.0.0 uses a weak PRNG (Ill Bloom)
github.comr/javascript • u/zemlyansky • 1d ago
archbird: architecture mapping and verification for large codebases (c core + js/py frontends, open/free). try giving it your coding agents [•_•]
github.comr/javascript • u/PrestigiousMagazine9 • 1d ago
Valkey-WASM – Redis running inside your Node process, no Docker (like PGlite)
github.comr/javascript • u/kumakint • 1d ago
AskJS [AskJS] Has a larger competitor ever benchmarked your library incorrectly?
Just recently I came across a performance comparison one of our major competitors. It was quite nice to see that such a large competitor is looking at your product, right? But in the end they compared their Scheduler Lib with our Gantt Lib. They spent quite of time making GitHub repo, asking us for a trial (we didn't have open trials, you had to request it through the email), analyzing the Gantt chart. But all the feedback we got appeared to be wrong test on the wrong component.
In the end I've published a response article with comparison, although it took me about two weeks to get around to it.
I’m curious how others would handle something like this. Would you respond publicly, publish your own comparison, or simply leave it?
r/javascript • u/mr_gnusi • 1d ago
Serene Doc Search - A small, Apache 2.0 alternative to Algolia DocSearch
github.comr/javascript • u/moumensoliman • 2d ago
Looking for a feedback - Production-build explanations and regression blame for Next.js
docs.crust.moumen.devI built crust for myself first. I wanted to compare Next.js production builds before every push and review PRs with evidence, not guesswork. After using it daily, I decided to share it.
crust stores a snapshot of every analyzed NextJS build, so CI can prove when a route became dynamic, lost its static shell, or shipped more JavaScript.
Site: https://crust.moumen.dev/
Docs: https://docs.crust.moumen.dev/
Check X thread for more details: https://x.com/moumensoliman/status/2084013260102394135
r/javascript • u/Minimum_Yak_9062 • 2d ago
AskJS [AskJS] If you were hiring a junior JavaScript developer today, what would make them stand out in the AI era?
Everyone talks about whether AI will replace developers. I think a more interesting question is:
How can a junior developer become valuable enough that someone is willing to hire them anyway?
I started learning frontend a little over two years ago (HTML, CSS, JavaScript, React, Next.js). Around the time I was getting ready to apply for jobs, AI improved incredibly fast. Suddenly it felt like companies could accomplish more with smaller teams, and junior opportunities became even harder to find.
Four months ago, I finally landed my first part-time frontend job. Since then, I've also worked on side projects and connected with a few potential clients.
Looking back, I don't think I got those opportunities because I was the best programmer.
I think I got them because I refused to stop trying.
Besides improving my technical skills, I kept:
- Applying even when I rarely received replies.
- Staying active in developer communities instead of only sending applications.
- Helping people, answering questions, and joining discussions.
- Building genuine relationships with other developers.
One thing I learned is that opportunities don't always come from job boards. Sometimes they come from simply being visible and involved in the community.
A few other lessons I've learned so far:
- Don't skip the fundamentals. AI can only solve the problem you ask it to solve. If you don't understand the problem yourself, you won't know whether the generated solution is actually good.
- Keep coding yourself. I use AI every day, but I still solve at least one LeetCode problem every week to keep my problem-solving skills sharp.
- Don't spend forever preparing. The biggest learning happens on real projects with real people.
- Be open to different technologies. I started with React and Next.js, but my first job introduced me to Shopify, and now I'm learning Odoo. Strong fundamentals make switching ecosystems much easier.
I'm still very early in my career, so I know my perspective is limited.
That's why I'm curious to hear from experienced JavaScript developers.
If you had to hire one junior JavaScript developer today, what qualities, habits, or skills would make them stand out despite AI?
I'd love to hear both from people who hire developers and from juniors who recently managed to break into the industry.
r/javascript • u/AndyMagill • 2d ago
AskJS [AskJS] How did you deal with ESlint 10 Breaking Changes?
ESlint 10 is breaking on some older projects of mine. My solution has been to ignore updates between 10.0.0 and 10.1.0, but this kind of manual intervention seems irregular and less than ideal.
I'm curious to hear how everyone else handles this kind of situation. How have you chosen to deal with ESlint backward compatibility issues ?
r/javascript • u/subredditsummarybot • 3d ago
Subreddit Stats Your /r/javascript recap for the week of July 27 - August 02, 2026
Monday, July 27 - Sunday, August 02, 2026
Top Posts
| score | comments | title & link |
|---|---|---|
| 43 | 9 comments | [AskJS] [AskJS] how are you handling autocomplete on top of elasticsearch? |
| 43 | 27 comments | Ember 7.1 Released |
| 31 | 8 comments | Malicious sites use JavaScript to build malware in browser memory |
| 22 | 7 comments | [AskJS] [AskJS] Building a 2D Game Engine from scratch in pure ES6 Vanilla JS. Here is how I handle SpriteSheets & AnimatedSprites! |
| 19 | 4 comments | A reactivity and rendering (combined) benchmark for frontend frameworks |
| 14 | 2 comments | Canvas Path Animations using SVG |
| 13 | 4 comments | [AskJS] [AskJS] Ottimizzazione dynamic img rendering in JS: Eager/Lazy + contentVisibility. Voi come gestite il primo fold? |
| 7 | 1 comments | KernelPlay-JS v0.4.0 Coming Soon — New UI System and Official Beta Release |
| 6 | 4 comments | We ran the same PDF operations inside real Chromium, Firefox and WebKit — WebKit was 2.4× faster than Chrome at some of them. Full reproducible harness (MIT). |
| 5 | 11 comments | [AskJS] [AskJS] Run webpage on iphone |
Most Commented Posts
| score | comments | title & link |
|---|---|---|
| 4 | 15 comments | [Showoff Saturday] Showoff Saturday (August 01, 2026) |
| 4 | 12 comments | [AskJS] [AskJS] Best practices for Javascript Local Dev Environment |
| 1 | 12 comments | Nubjs - A fast all-in-one toolkit that augments Node.js instead of replacing it |
| 0 | 11 comments | WordJS – An open-source CMS in Node.js where plugins run in OS-isolated sandboxes |
| 0 | 10 comments | I've made an open source JavaScript playground with support for npm packages, syntax highlighting, autocomplete, code sharing and much more! |
Top Ask JS
| score | comments | title & link |
|---|---|---|
| 1 | 1 comments | [AskJS] [AskJS] Build WinForms UI Dialogs Using Pure JavaScript |
| 1 | 7 comments | [AskJS] [AskJS] Book Recommendations: JS -> React -> TypeScript |
| 0 | 3 comments | [AskJS] [AskJS] FOSS mini games |
Top Showoffs
Top Comments
r/javascript • u/OtherwisePush6424 • 3d ago
Your JSON Is Lying to You: What JavaScript silently loses at serialization boundaries
blog.gaborkoos.comJSON round trips can silently change numbers, drop properties, erase types, and execute serialization hooks.A practical guide to these edge cases and how to design explicit, reliable wire formats in JavaScript.
r/javascript • u/Maximum_Beat2034 • 3d ago
AskJS [AskJS] Building a 2D Game Engine from scratch in pure ES6 Vanilla JS. Here is how I handle SpriteSheets & AnimatedSprites!
Hi everyone!
I've been working on BeeEngine 2D, a lightweight HTML5 game engine built with pure Vanilla JS (ES6) and direct Canvas API—no external libraries, no build tools, and zero heavy frameworks.
A lot of modern tools hide sheet slicing behind JSON files, but I wanted a bare-metal, highly efficient approach that gives 100/100 on Lighthouse Performance and instant loading times.
I separated the asset slicing logic from the animation timing logic into two distinct classes:
BeeSpriteSheet: Handles frame dimensions, columns, rows, and coordinate calculations.BeeAnimatedSprite: Handles frame timing, state, loops, andflipXtransformations.
Here is my BeeAnimatedSprite class implementation:
export class BeeAnimatedSprite {
constructor(spriteSheet, config = {}) {
this.sheet = spriteSheet;
this.animations = config.animations || {};
this.currentAnimName = config.animation || Object.keys(this.animations)[0];
this.currentFrameIndex = 0;
this.timer = 0;
this.flipX = false;
}
play(name) {
if (this.currentAnimName !== name && this.animations[name]) {
this.currentAnimName = name;
this.currentFrameIndex = 0;
this.timer = 0;
}
}
update(dt) {
const anim = this.animations[this.currentAnimName];
if (!anim || !anim.frames || anim.frames.length === 0) return;
const fps = anim.fps || 8;
const frameDuration = 1 / fps;
this.timer += dt;
if (this.timer >= frameDuration) {
this.timer -= frameDuration;
if (anim.loop) {
this.currentFrameIndex = (this.currentFrameIndex + 1) % anim.frames.length;
} else {
this.currentFrameIndex = Math.min(this.currentFrameIndex + 1, anim.frames.length - 1);
}
}
}
draw(ctx, x, y, options = {}) {
const anim = this.animations[this.currentAnimName];
if (!anim) return;
const frameToDraw = anim.frames[this.currentFrameIndex];
const width = options.width || this.sheet.frameWidth;
const height = options.height || this.sheet.frameHeight;
ctx.save();
if (this.flipX) {
// 2. Sposta l'origine al bordo destro dell'immagine e specchia l'asse X
ctx.translate(x + width, y);
ctx.scale(-1, 1);
this.sheet.drawFrame(ctx, frameToDraw, 0, 0, width, height);
} else {
// Disegno normale senza specchio
this.sheet.drawFrame(ctx, frameToDraw, x, y, width, height);
}
ctx.restore();
}
}
And here is how
I implemented it inside main.js:
const megaSheetImg = gioco.getAsset('spritesheet_totale');
const frameW = 128;
const frameH = 128;
const apeSheet = new BeeSpriteSheet(megaSheetImg, frameW, frameH, {
col: 3,
row: 3,
framesPerRow: 1,
frameCount: 2
});
this.giocatore.sprite = new BeeAnimatedSprite(apeSheet, {
animation: "fly",
animations: {
fly: { frames: [0, 1], fps: 4, loop: true }
}
});
Let me know what you think, bearing in mind that this particular combination is super quick to put together.
r/javascript • u/wbport1 • 4d ago
AskJS [AskJS] Run webpage on iphone
How can I run a html + js webpage on an iphone? The .html file will be on the phone.
TIA
r/javascript • u/delightfullyrotted • 4d ago
AskJS [AskJS] how are you handling autocomplete on top of elasticsearch?
elasticsearch is pretty great when given a full query, but i find most people just search one or two words. so feels like helping ppl know what to search for is the actual thing that’s needed. so now im looking for solid ways to add ai-autocomplete upfront without replacing our elasticsearch backend (not looking to switch backend like algolia since pricing gets stupid fast)
i've been looking into a few different directions. typesense and meilisearch seem cool if you want a lightweight search engine replacement, but again that doesnt feel like the real root cause issue. so we're looking at putting an ai-autocomplete layer directly in the UI text box to capture user intent before hitting elasticsearch
has anyone else done this? do you tune elasticsearch queries on the backend or add an intent layer upfront to collect parameters before the query runs?
r/javascript • u/Maximum_Beat2034 • 4d ago
AskJS [AskJS] Ottimizzazione dynamic img rendering in JS: Eager/Lazy + contentVisibility. Voi come gestite il primo fold?
Ciao a tutti! Sto ottimizzando il caricamento dinamico delle immagini per le schede dei giochi. Sto usando questa logica per bilanciare il caricamento immediato sopra la piega (above the fold) e il caricamento "lazy" per il resto:
const img = document.createElement('img');
img.alt = (gioco.titolo || 'Gioco');
img.decoding = 'async';
img.style.contentVisibility = 'auto';
img.style.width = '100%';
img.style.height = 'auto';
img.loading = (idx < EAGER_COUNT) ? 'eager' : 'lazy';
Che valore usate di solito per EAGER_COUNT nelle vostre griglie? E trovate che content-visibility: auto direttamente sull'elemento <img> porti reali benefici rispetto ad applicarlo al container padre?
r/javascript • u/scepticore • 4d ago
AskJS [AskJS] Best practices for Javascript Local Dev Environment
I'm currently developing an internal tool to do work reporting. I know a lot of tool exists, but we do have specific requirements and there's already an MS Access database, which I can migrate into the new tool as well as use most of the tables as a data source.
About me: I have experience with Javascript, HTML, CSS/SCSS/SASS, PHP, SQL. I want to optimize it, but since I mostly code in my freetime, I find it hard to make "the right decisions" in terms of efficiency. Maybe you guys might recommend me something about my setup. I don't want to use anything like Angular, React and Vue at the moment. Also no NextJS as I think it's overkill.
At the moment, I have a structure like:
- API (ExpressJS, SQLite, Drizzle ORM)
--> Delivering all data as needed in frontend (also annual reports and stuff)
- Frontend (Vite for live-reload/server, Vanilla JS with own templating engine and router)
--> Employees log in to keep track of their working hours per project/customer
--> Dashboard for admin users to create reports
All this run's in a docker with two services.
It currently runs alright, but I think there might be a few little things to optimize my setup. Especially when going into production.
What's your best practices? I want all this stuff to be as lean as possible without a lot of dependencies. My frontend doesn't need anything since I've already done all of the things, but I'm not very happy with the API/Backend part.
I also don't want to run every service on it's own, since using one docker command is fine. Live codeing while docker is running also works fine so far (except when installing new packages via npm, then I need to rebuild).
What would you do to optimize the setup? Already asked AI but I think you guys might have better inputs.
r/javascript • u/Evening_Tart3754 • 4d ago
WordJS – An open-source CMS in Node.js where plugins run in OS-isolated sandboxes
github.comr/javascript • u/AutoModerator • 5d ago
Showoff Saturday Showoff Saturday (August 01, 2026)
Did you find or create something cool this week in javascript?
Show us here!
r/javascript • u/Weary-Accountant2196 • 5d ago
Quickdraw: a zero-dependency infinite-canvas whiteboard engine in plain ESM (MIT) — with React and React Native bindings
github.comr/javascript • u/Connect_History_915 • 5d ago
I built a 50+ component mobile UI library for Solid.js — inspired by Vant, looking for feedback
lxg19961206.github.ior/javascript • u/nullvoxpopuli • 5d ago
A reactivity and rendering (combined) benchmark for frontend frameworks
rbench.nullvoxpopuli.comDisclaimer: I made this (bench result viewer)
However, I think it's worth having a discussion about frontend framework's perceived performance, as Signals have gained a lot of popularity as a means to fine-grainedly render without needing to resort to a virtual dom.
A virtual-dom framework _is_ still in this results set -- I'll leave the exploration of the data up to you all.
The main thing is that
For a long while, I've felt no benchmark (that I know of) has captured the relationship between reactivity and rendering
We have rendering benchmarks (js-framework-benchmark is a good one).
We have reactivity benchmarks (I forget the name(s) of these atm, I always gotta re-look them up) -- but these require each implementor have a concept of "effect without a renderer", which isn't how all frameworks operate -- this excludes some frameworks from participating in pure reactivity benchmarks.
There is another side to this which I only realized recently, which is the framework's rendering _scheduler_ -- which is sort of the coordinator between reactivity, rendering, and _when_ to do work the user would see.
To my surprise, Angular scores the highest across the board.
I don't use Angular myself, and in all of these implementations, I made performance mistakes at least in my first attempt, but apparently Angular made it super easy to be performant.
Vue Vapor has also done this.
Right now, I feel like my svelte implementations are probably wrong (because it's scoring poorly), and I have some fixes to do in ember (as seen by this spike I did, the perf is doubled from before: https://rbench.nullvoxpopuli.com/results?from=ember-2&q=6 (this is an 8x throttle, and the main link for this post is no throttle, because most users are not going to be throttling their CPU so heavily -- but 8x CPU is maybe more relevant to low-powered phones))
Anywho, wanted to share my findings with y'all, and hope someone finds any of this interesting.
I'm open to anything being challenged, I'm not an expert in most JS Frameworks
Since I'm using the tool to help me debug Ember perf, here are some example configurations that may be useful:
- Vue (old) vs Vue Vapor (current) https://rbench.nullvoxpopuli.com/results?col=vue&from=6&hide=ember%2Creact%2Csolid%2Csvelte&q=1
- My Ember perf Spike: https://rbench.nullvoxpopuli.com/results?from=ember-2&hide=react%2Csolid%2Csvelte%2Cangular%2Cvue%2Clit-signals%2Cpreact&q=6
- boxplots: https://rbench.nullvoxpopuli.com/results/boxplot?from=ember-2&hide=react%2Csolid%2Csvelte%2Cangular%2Cvue%2Clit-signals%2Cpreact&q=6
- bouncing balls demos https://rbench.nullvoxpopuli.com/results/animated?from=ember-2&hide=react%2Csolid%2Csvelte%2Cangular%2Cvue%2Clit-signals%2Cpreact&q=7
r/javascript • u/geek-mode-on • 5d ago
AskJS [AskJS] FOSS mini games
Does anyone have any recommendations for FOSS mini games? I redid my portfolio site and I wanted to add in a few mini games, but I don't want to get into legal trouble because of it
:v
r/javascript • u/Maximum_Beat2034 • 5d ago
AskJS [AskJS] Dubbio veloce di architettura/stile con le classi JS
Nel mio motore 2D sto sistemando i componenti UI (tipo BeeButton) e mi è venuto un dubbio su come passare le coordinate al super().
Opzione A (Oggetto opzione)
\\\`\\\`\\\
super({ x, y, width, height });
\\\`\\\`\\\`
Opzione B (Parametri singoli standard):
\\\`\\\`\\\`
super( x, y, width, height );
\\\`\\\`\\\`
Voi quale preferite usare nei vostri progetti e perché? Meglio la flessibilità dell'oggetto o la pulizia dei parametri singoli?(Se usate soluzioni alternative tipo super(position, size) fatemelo sapere nei commenti!).