Katkat

Debug wrong DOM attributes in unknown framework

StripeSoftware Engineer · Technical Screen

Last updated

This question evaluates a candidate's ability to debug frontend DOM attribute mismatches by understanding framework-specific attribute/prop reflection, template/JSX compilation, SSR/hydration differences, and build-toolchain interactions.

In an unfamiliar frontend framework, rendered DOM tags contain incorrect attributes (for example, className vs class, mis-cased data-* attributes, or boolean props serialized incorrectly). Outline a step-by-step debugging plan: create a minimal reproduction, inspect the template-to-DOM compilation or JSX/TSX transforms, check SSR vs client hydration mismatches, verify component prop passthrough and attribute reflection for custom elements, audit build tooling and plugins, and confirm reserved or framework-specific props. Show how you would isolate the root cause, implement a fix, add safeguards (lint rules, type checks, tests), and prevent regressions.