Loading…
A short voice session: one question, one follow-up, then instant feedback — up to 5 minutes.
Give the editor key={userId}; when the key changes, React treats it as a different component, unmounts the old one and mounts a fresh one with clean state.
React preserves a component's state as long as the same component type stays in the same position in the tree. Switching users only changes props, so the editor keeps its old internal state. Keys are part of a component's identity: