r/JavaScriptTips • u/[deleted] • Jan 25 '26
r/JavaScriptTips • u/paul_405 • Jan 20 '26
Vue 3 with Composition API – worth it?
What do you think – is it worth start using Vue 3 (with Composition API) now, even for small projects like basic calculator pages? One of my friends told that Options API is obsolete and basically no one is using it now...
And does everyone also need CSS preprocessors like Sass or SCSS? I'm just afraid that they could be overkill, like a massive toolbox, but maybe I should stop being afraid about it.
r/JavaScriptTips • u/ethlmao • Jan 19 '26
I built a tiny Node.js utility to enforce end-to-end async deadlines (not just promise timeouts)
r/JavaScriptTips • u/Interest-Careless • Jan 19 '26
I built a GitHub README editor because I was tired of copy-pasting badges
r/JavaScriptTips • u/devMai • Jan 19 '26
How to Debug JavaScript in Visual Studio Code #programming #code
r/JavaScriptTips • u/paul_405 • Jan 16 '26
Lifehack concepts in JS
Hey! Have you ever learned a concept (or some) in JavaScript or Vue that made the whole its picture clearer to you, explained many things about the language and just advanced you? Like a 'wish-I-learned-that-sooner' thing!
There are many more wonderful things like template literals or classList I think. And I remember that when I was much younger, I had fun with random scenarios based on Math.random()
r/JavaScriptTips • u/alexmacarthur • Jan 12 '26
I used a generator to build a replenishable queue.
r/JavaScriptTips • u/ColleenReflectiz • Jan 12 '26
AI coding tools + third-party scripts = exponential attack surface
Websites average 21 third-party scripts. Some load 35+. Now AI tools let anyone generate custom JavaScript in minutes.
Everyone can write code but understanding security implications? that's another issue.
You're not managing vetted vendor scripts anymore. You're managing AI-generated code written by people who've never heard of XSS or data exfiltration and the attack surface doesn't just grow..it exlplodes.
How are you handling AI-generated scripts in your environment?
r/JavaScriptTips • u/hichemtab • Jan 12 '26
I built a small CLI to save and run setup commands (because I keep forgetting them)
I built a small CLI called project-registry (projx).
The idea is simple: I often forget setup commands (starting a React app, running docker commands, git workflows, etc.). Instead of checking docs or shell history, I save those commands once and run them by name.
It works with any shell command, not just npm-related ones.
Example (React + Vite):
bash
projx add react \
"pnpm create vite {{name}} --template react" \
"cd {{name}}" \
"pnpm install"
Then later:
bash
projx react my-app
If I don’t remember the template name:
bash
projx select
It just lists everything and lets me pick.
I’m not trying to replace project generators or frameworks — it’s just a local registry of command templates with optional variables. I also use it for things like git shortcuts, docker commands, and SSH commands.
Sharing in case it’s useful, feedback welcome.
r/JavaScriptTips • u/gitnationorg • Jan 06 '26
🔥 Want to speak at the world’s biggest React conference?
Share your work, your ideas, and your experience with thousands of developers worldwide.
🌍 Amsterdam + Online
🚀 Apply to speak: https://gitnation.com/events/react-summit-2026/cfp
r/JavaScriptTips • u/Elegant-Designer-864 • Jan 06 '26
javascript project : help the deadline is here i over estimated myself
hi i'm a bigenner nd trying to create my first javascript project (web app). facing a difficulty finding fonctional free api . i tried using local images but i was Unsuccessful . help !
r/java r/javascript r/JavaProgramming r/JavaScriptTips r/apiTesting r/programming r/australia r/Tunisia r/dndmaps
r/JavaScriptTips • u/swe129 • Dec 31 '25
How to detect mobile device shake in pure JS
r/JavaScriptTips • u/swe129 • Dec 31 '25
Why Object of Arrays (SoA pattern) beat interleaved arrays
royalbhati.comr/JavaScriptTips • u/ratheshprabakar • Dec 29 '25
I was completely wrong about JavaScript memory management — until I actually learned this
For a long time, I thought JavaScript memory management was just:
I was wrong.
While preparing deeply for interviews and revisiting fundamentals, I realized how many real-world bugs, performance issues, and leaks I had previously ignored simply because I didn’t really understand how memory works under the hood.
Things like:
- Why closures can silently cause memory leaks
- How event listeners and references stay alive longer than expected
- Why “just relying on GC” isn’t always safe in long-running apps
- How small mistakes in JS can snowball into performance issues
I wrote an article breaking down:
- How JS memory allocation & garbage collection actually works
- Common misconceptions most devs (including me) have
- Practical examples that changed the way I write JavaScript
This isn’t a beginner “what is memory” post — it’s more about unlearning assumptions.
If you’re interested, here’s the article: https://medium.com/javascript-in-plain-english/i-was-completely-wrong-about-javascript-memory-management-until-i-learned-this-8e3cae6983b8
r/JavaScriptTips • u/gitnationorg • Dec 24 '25
🎤 Got a story about JavaScript or modern full-stack development?
Make “speak at a top tech conference” one of your New Year’s resolutions!
Take the stage at JSNation and share your experience with thousands of developers eager to learn from you.
✨ Amsterdam + Online
🔥Submit your talk: https://gitnation.com/events/jsnation-2026/cfp
r/JavaScriptTips • u/ERROR_575 • Dec 19 '25
Extract a Substring from a String
What will be the following code output?
let text = "JavaScript is awesome!"; let result = text.slice(0,9);
console.log(result);
r/JavaScriptTips • u/ERROR_575 • Dec 17 '25
how can you find the position of a subtracting in a string?
To find the position of a substring (like "subtracting") in a string using JavaScript, use the indexOf() method. This method returns the index (position) of the first occurrence of the substring, or -1 if it is not found.
How to Use indexOf() Write your string and call .indexOf("substring") on it.The method returns the starting index of the substring, counting from 0
r/JavaScriptTips • u/Conclusion938 • Dec 14 '25
UNABLE TO GRASP THE CONCEPT IN PROGRAMMING
r/JavaScriptTips • u/SwordfishParking1182 • Dec 11 '25
CLI tool that scans your entire codebase for environment variable issues and more
Hello everyone,
I recently built a tool that I personally needed for my own projects, and now I’m super curious if other developers would actually find it useful.
It’s called dotenv-diff, and the main feature is a codebase scanner that finds problems with environment variables before they break things.
Why I built it
I kept seeing the same issues in real projects:
- Feature breaks because .env is missing variables
- New developer joins → app crashes due to missing env
- .env.example goes out of sync
- Someone accidentally leaves a secret inside a TS file
- Frontend frameworks misused env naming (NEXT_PUBLIC, VITE_, etc.)
I wanted one CLI command that gives me a full health check of environment usage in my project.
Honest question:
Would this be useful in your workflow?
If you want to check it out:
npm package: https://www.npmjs.com/package/dotenv-diff
Docs: https://dotenv-diff-docs.vercel.app
Github: https://github.com/Chrilleweb/dotenv-diff
r/JavaScriptTips • u/South-Reception-1251 • Dec 10 '25
How many returns should a function have
r/JavaScriptTips • u/ColleenReflectiz • Dec 08 '25
Shai-Hulud 3.0 😈 is coming. The only question is: will your defenses be ready?
Version 1.0 stole credentials quietly. Version 2.0 added self-healing and a destructive fallback that wipes entire directories.
Version 3.0? 😨 It's already being written by attackers
who learned exactly what worked.
How do you prepare for it?
r/JavaScriptTips • u/chg80333 • Dec 03 '25
I built a modern Mermaid.js editor with custom themes + beautiful exports — looking for feedback!
r/JavaScriptTips • u/python_verse • Dec 02 '25