Mount a component

Mount a component in JavaScript — with the four heights of help laid out: do it now, make it easier for the next person to accept, work out the right move when you are stuck, and learn the pattern so it stops coming back.

4prompt heights
Open it in the interactive atlas →

The four heights

The same task, four distances: today's deadline, the next reviewer, the stuck moment, the pattern.

Execute — do the immediate task

+
Mount this component into the DOM so it appears on the product-list page. Take the card component…
Mount this component into the DOM so it appears on the product-list page. Take the card component function that returns an element and append it into the container with id product-list. Ensure you clean up any previous placeholder node with class loading-skeleton before appending, and return the mounted element so the caller can attach events.

Improve — make it easier to accept

+
Before I call mount in production, make mounting predictable: add a check that the container…
Before I call mount in production, make mounting predictable: add a check that the container product-list exists, log a clear error if it does not, and make the mount function idempotent so reruns replace the old card rather than duplicating. Highlight any race conditions if async data is still loading.

Decide — diagnose the stuck moment

+
I mounted the card into product-list during a navigation handler and users reported duplicated…

Multiple mounts duplicated elements after route change.

I mounted the card into product-list during a navigation handler and users reported duplicated items after fast route changes. The engineering manager and the QA lead are watching. I don't know whether to cancel previous mounts, debounce the handler, or use a marker to prevent duplicates. What's the most likely root cause and the minimal fix that stops duplication without refactoring routing logic?

Become — change the pattern

+
We have six mount functions doing almost the same DOM replacement with tiny differences in cleanup…

Mounting logic is repeated in six modules with slight variations.

We have six mount functions doing almost the same DOM replacement with tiny differences in cleanup and error messages. This causes bugs when we change how we identify the container. Where are we losing consistency and what habit should we change to make mounts reliable and maintainable across the codebase?

Next to this one

Other programming language work people do in JavaScript.

Every task here came from the work, not from a feature list — which is why the prompts name what you want done and never the button that does it. The tool changes; the work does not.
Copyright © LLOS.ai · 2026 — original pedagogy, voice, and design — all rights reserved.

The rest of the map

Same library, five ways in.