Skip to content
React·Intermediate·Conceptual·1 min read

What happens when an element type changes at the same position?

Short interview answer

React replaces that subtree, removes its prior host nodes and state, and mounts the new type. Compatible-looking output does not preserve component identity.

Key takeaway

Explain the underlying mental model clearly, then support it with a concrete example and its trade-offs.

← Back to React reconciliation

Related questions