Skip to main content
Journey Uncommon Logo
JourneyUncommon
easyReactprops read-onlySingle-choice MCQ

A child component receives a settings object as a prop and changes one of its fields directly. Why is mutating the prop like this a problem?

function Panel({ settings }) { settings.theme = 'dark'; // mutating the prop return <div>{settings.theme}</div>; }