假设我有一个简单的代码,例如:
<ListItem
button={true}
>
<Typography variant='caption' color='primary'>
{value}
</Typography>
<Button
onClick={foo}
>
Button
</Button>
</ListItem>
Run Code Online (Sandbox Code Playgroud)
当我单击 ListItem 内的任何内容时,会触发连锁反应,这是可以的,但是当我单击按钮时,我不希望触发父组件的连锁反应。我怎么做?