/r/javascript
Chat about javascript and javascript related projects. Yes, typescript counts. Please keep self promotion to a minimum/reasonable level.
All about the JavaScript programming language.
Specifications:
Resources:
Related Subreddits:
/r/javascript
I have completed a project which is basically an .io game written in JS it's multiplayer using Websocket. The issue I am facing is that when players connect a setInterval starts to update frontend simultaneously on all players. But the Interval never stops even after disconnection. The messages keep piling up slowing down the server.
I’m doing a technical project but I haven’t the slightest clue how to statically analyze an api call in a js file. I know you do it dynamically during runtime but how would I do it statically from click handler to api call to return of data. Help my professor demands for research topic!!!
Hi everyone,
I am a very green developer. I learned last year and at the time they had taught CRA (even though they knew they would need to start teaching vite next term, they just hadn't changed over).
I am wondering if you think it would be worth the effort for me to learn vite? I am doing a webapp for my partners business, it's really simple but I do want to get it up asap. Not sure if learning vite will take me a long time or how easy it is to you. At the same time, I want the webapp to run long term and worry with things becoming deprecated with CRA. And maybe it is a good opportunity to simply learn vite so I can continue with it.
Any input and thoughts help. Again my knowledge base is very beginner so please let me know your thoughts.
Much appreciated!
Did you find or create something cool this week in javascript?
Show us here!
[This post refers to JS in the browser, as in a React app]
Basically, we want to check if people are being truthful about how many devices they are using our service on. It's B2B and sold per-seat, so we don't want any kind of captchas or autobans -- just want to know if a client is breaking their service agreement by sharing logins, etc.
Obviously my initial thought was to use IP/User Agent combo, but surely there's a better way to do this in 2025 without a lot of lift?
Post a link to a GitHub repo or another code chunk that you would like to have reviewed, and brace yourself for the comments!
Whether you're a junior wanting your code sharpened or a senior interested in giving some feedback and have some time to spare to review someone's code, here's where it's happening.
Hey r/webdev, r/learnjavascript, and r/gamedev! 👋
I’m working on a free coding platform (imagine Codecademy meets freeCodeCamp) with a premium design, mixing 2D game development in JavaScript to make learning interactive and fun. The goal? To create an engaging, accessible resource with zero paywalls.
What’s the plan?
But I need YOUR help to make this better!
What’s actually being used in your production codebases right now? Let’s break it down:
Are you cool with switching between different formats (in terms of spacing) or does it drive you crazy?
Any opinions are appreciated.
Monday, January 20 - Sunday, January 26, 2025
###Top Posts
###Most Commented Posts
score | comments | title & link |
---|---|---|
0 | 31 comments | [AskJS] [AskJS] Which OOP style to use in current-gen JS? |
0 | 24 comments | [AskJS] [AskJS] Hello devs!. I need your guidance, JavaScript or Java? |
0 | 12 comments | [AskJS] [AskJS] How can I avoid unnecessary async overhead with async callbacks |
0 | 6 comments | [AskJS] [AskJS] What are you top choices for third-party libs/components? |
0 | 5 comments | My attempt to convert a module from SQLite3 to MySQL. Not quite there.. |
###Top Ask JS
score | comments | title & link |
---|---|---|
2 | 2 comments | [AskJS] [AskJS] Fullstack app structure |
1 | 2 comments | [AskJS] [AskJS] Chrome Extension Development: Managing Cross-Script Communication for AI Integration |
0 | 1 comments | [AskJS] [AskJS] Morphing Animation in JS like in Powerpoint |
###Top Showoffs
###Top Comments
I'm starting a new project that requires a frontend, backend, and some shared code.
I'm currently thinking of: using Next for the frontend, Express for the backend, and using npm shared modules to share code between them.
Is this a reasonable approach? Or is it worth going all-in on a single framework for both frontend and backend.
I'm implementing a Chrome extension that handles communication between content scripts and background scripts, focusing on monitoring and managing state across different contexts. The core implementation involves maintaining reliable message passing channels while handling asynchronous communication flows.
I've encountered several architectural challenges around maintaining consistent state and reliable message delivery between scripts. I'm particularly interested in learning about proven patterns and approaches for:
Would appreciate insights from developers who have experience with similar Chrome extension architectures or comparable JavaScript implementations. What patterns or approaches have you found most effective for managing cross-script communication in extensions?