Tag: debugging

  • Are they the same?

    While debugging I needed to know if two references in two separate parts of my codebase were pointing to the same object in memory. According to my searching, there isn’t a way to print out memory addresses of data in Javascript (without using special V8 debugging expressions). But there’s a way to find the answer…

  • Whoops, we called that API twice

    In one of my codebases at work we have a custom React hook for rendering the result of a promise: At first blush this may seem fine. This function takes a promise object, sets it on state, and then fires a useEffect to register a callback that updates component state with the result of the…

  • Typescript in Node and the Client

    Hey! Another one for the debug journal. We’re adding some back-end endpoints using Express.js to our Typescript/React front-end. So I threw together a server.ts file and tried to run it with ts-node. But nope: Yeah, imports. We’re not yet in the future where require is gone and everything just works. But that’s alright, someone from…

  • React Native Async Trouble

    This is a #DebugJournal post, which means you’re reading the notes I took in real-time while debugging the issue. It won’t read like a nicely put together tutorial, more like a boring field-journal. Multiple times now I’ve come to situations where React Native just hangs up, and stops execution of a promise or generator-based function…