How can i have 2 different click events for the button and the ListItem?
I'm mostly interested in the button click event without the ListItem event.
import React from "react";
import ReactDOM from "react-dom";
import ListItem from "@material-ui/core/ListItem";
import ListItemText from "@material-ui/core/ListItemText";
function App() {
  const handleButtonClick = () => {
    console.log("button click");
  };
  const handleListItemClick = () => {
    console.log("list click");
  };
  return (
    <ListItem button onClick={() => handleListItemClick()}>
      <button onClick={() => handleButtonClick()}>
        get only the button click
      </button>
      <ListItemText primary="without the ListItem click event..." />
    </ListItem>
  );
}
const rootElement = document.getElementById("root");
ReactDOM.render(<App />, rootElement);
 
    