Parámetros en funciones JSX

Supongamos que nuestra función showMess recibe como parámetro el nombre de la persona a la que queremos saludar:

jsxfunction showMess(name) {
  alert('hello, ' + name);
}

Se puede pasar este parámetro al vincular la función al evento. Para ello, la llamada a nuestra función debe envolverse en una función flecha:

jsxfunction App() {
  function showMess(name) {
    alert('hello, ' + name);
  }
  
  return <div>
    <button onClick={() => showMess('user')}>show</button>
  </div>;
}

De esta manera podemos vincular la misma función a varios botones con diferentes parámetros:

jsxfunction App() {
  function showMess(text) {
    alert(text);
  }
  
  return <div>
    <button onClick={() => showMess('user1')}>show1</button>
    <button onClick={() => showMess('user2')}>show2</button>
  </div>;
}
Задание 1

Se dan tres botones:

jsxfunction App() {
  return <div>
    <button>act1</button>
    <button>act2</button>
    <button>act3</button>
  </div>;
}

Haz que al hacer clic en el primer botón se muestre el número 1 mediante alert, al hacer clic en el segundo botón - el número 2, y al hacer clic en el tercero - el número 3.