Skip to content

Tags

#javascript

JavaScript in the browser and on the server: language features, tooling, performance and the bugs that only show up in production.

17 posts

Posts tagged #javascript

  1. Question

    please how do i fix my react timer, it stays at 1 😭

    good evening everyone 🙏🏾 i'm building a pomodoro timer for my portfolio. the seconds go from 0 to 1 and then it just stays at 1 forever. no error in the console. i just came across something called "stale closure" but i don't understand it. here is my code: import { useEffect, useState } from 'react' function Timer() { const [seconds, setSeconds] = useState(0) useEffect(() => { const id = setInterval(() => {…

    Damilola Ogunleye10likes7comments

  2. Question

    ¿Cómo organizan su tiempo los que trabajan de noche y estudian programación de día?

    Hola a todos, disculpen la pregunta, es un poco personal y no tan técnica. Trabajo en un call center atendiendo clientes de Estados Unidos, turno de noche, de 9 pm a 6 am (hora de Lima). Llego a casa, duermo hasta la 1 pm más o menos, y en la tarde intento estudiar JavaScript con cursos gratis. Pero me siento cansada todo el tiempo y avanzo muy lento. A veces leo la misma lección tres veces y no se me queda nada,…

    Rosa Quispe5likes9comments

  3. Question

    Por que meu useEffect está rodando duas vezes? (e o fetch também)

    Boa noite, pessoal! Estou fazendo um projeto de portfólio (uma lista de filmes consumindo uma API pública) e notei uma coisa estranha: o console.log dentro do useEffect aparece duas vezes, e na aba Network o fetch também é feito duas vezes. useEffect(() => { console.log('buscando filmes') fetch('https://api.exemplo.com/filmes?pagina=' + pagina) .then(res => res.json()) .then(dados => setFilmes(dados.resultados)) },…

    Larissa Souza4likes6comments

  4. Question

    useEffect fetch running twice in my take-home test?? is my code broken

    doing a take-home for a junior role (round 2, we move 💪). simple React app that fetches a list of products. in the network tab i can see the request going out TWICE every time the page loads. i panicked and added a flag so it only fetches once, and now sometimes the list doesn't show at all, which is worse lol. here's the code: import { useEffect, useState } from 'react' let hasFetched = false export default…

    Jade Thompson9likes8comments

  5. Question

    Disculpen la pregunta: mi botón no hace nada y la consola dice 'Cannot read properties of null'

    Hola, disculpen si es muy básica. Estoy haciendo una lista de tareas para practicar. Cuando hago clic en el botón no pasa nada y en la consola sale esto: Uncaught TypeError: Cannot read properties of null (reading 'addEventListener') at app.js:3 Mi HTML: <head> <script src="app.js"></script> </head> <body> <input id="tarea" type="text"> <button id="agregar">Agregar</button> <ul id="lista"></ul> </body> Mi app.js:…

    Rosa Quispe7likes6comments

  6. Article

    useEffect no es para todo: 5 cosas que hacía mal y cómo las arreglé

    Parce, hace un año revisé un proyecto mío viejo y conté 43 useEffect. Hoy tiene 9. Y funciona mejor. Les cuento los 5 errores que más cometía, por si se ven reflejados. 1. Estado derivado en un efecto // mal const [nombreCompleto, setNombreCompleto] = useState('') useEffect(() => { setNombreCompleto(nombre + ' ' + apellido) }, [nombre, apellido]) // bien const nombreCompleto = nombre + ' ' + apellido Si algo se…

    Camilo Restrepo19likes9comments

  7. Article

    Flaky test bingo: 12 squares I have seen in real life (with fixes)

    Hello everyone) I collect flaky test causes like other people collect stamps. Here is my bingo card from the last 4 years. All real, all happened to me or my team. If you get a full row in one sprint, you deserve a day off. Row 1: Time 1. Test uses real current time. Fails at midnight, at end of month, on DST change. Fix: freeze time. In Playwright page.clock.setFixedTime() , in Jest or Vitest fake timers with a…

    Iryna Melnyk27likes11comments

  8. Experience

    BLUF: 20 years a Chief, 1 week a junior. What my first week as a developer actually taught me

    BLUF: My first week as a junior developer at 42 was humbling, a little embarrassing, and the best career decision I ever made. A year and change later, here's what I wish someone had told me. Long post, grab coffee. Background for the new folks. Born in Olongapo, joined the US Navy at 18, retired as an IT Chief after twenty years. I ran networks on ships, I ran sailors, I ran a division. Then I did a 16-week…

    JoJo Ramos34likes12comments

  9. Experience

    I blocked the release on Friday and whole team look at me like I kill their cat

    Story time 😅. Friday 4pm, release for our Australian client at 5pm. Everything is green. Dev team already ordered bubble tea to celebrate. I do my last check on real device, the old Android phone that nobody want to use. Checkout button not work. Tap, nothing happen. On iPhone fine, on Chrome desktop fine, on the dev laptop of course fine. "Works on my machine" 3 times in 10 minutes. I write in channel: "Release…

    Trần Phương Thảo28likes12comments

  10. Article

    Web Dev Roadmap 2026 para sa beginners (libre lahat, walang bootcamp)

    Mga kapatid, ito na yung pinaka-hinihingi niyo sa comments ko for months. Yung roadmap na binibigay ko sa mga students ko, buo, libre. Hindi ito para maging "senior in 3 months". Ito ay para sa taong may trabaho o nag-aaral, may 2 oras kada araw, at gustong maging job-ready sa loob ng isang taon. (Goal desk. Hindi akin. Yung akin may electric fan at kapeng 3-in-1.) Phase 0: Setup (week 1) VS Code, Git, at isang…

    Kuya Migs27likes18comments

  11. Experience

    what coding after bedtime actually looks like (a real log from last night, mom of 3 edition)

    so people keep asking me how i "find time" to learn to code with 3 kids and a full time job and honestly i dont find it, i steal it. here is last night, exactly as it happened, becuase i wrote it down as a joke and then thought maybe someone else needs to see that its messy for everyone lol 8:52pm all three in bed. husband left for night shift at the plant at 9. dishes can wait. they always wait. they're very…

    Jen Hayes54likes14comments

  12. Experience

    Bug of the week: date field only broken for Japanese users (and it was not timezone)

    Hello everyone, first post here 🐞. I am QA in Hanoi, we test web app for one Japanese client and one Australian client. This week I found a bug that is so funny I want to share. Symptom: Japanese client say "birthday field always say Invalid date". Australian client no problem. Dev team test it, no problem. Of course "cannot reproduce" 😅 First everybody think timezone, because it is always timezone. Not timezone.…

    Trần Phương Thảo24likes8comments

  13. Article

    Paano lumabas sa tutorial hell (from someone who lived there for 2 years)

    Mga kapatid, real talk muna. Bago pa ako naging "Kuya Migs" sa YouTube, dalawang taon akong stuck sa tutorial hell. Na-finish ko yata lahat ng "build a todo app" na video sa internet. Pero pag binuksan ko na yung blank na VS Code, wala. Blangko. Parang exam na hindi ka nag-review. Kaya ito yung mga ginawa ko para makaalis, at ito rin yung sinasabi ko sa mga students ko ngayon. 1. Yung 20-minute rule Pag nanonood ka…

    Kuya Migs7likes8comments

Get the best of Dynamo Geeks weekly

One email each Monday with the most useful posts. No spam; unsubscribe in one click.