Button onPress not working

I have created a blank project with the UXP Developer Tools. And I have only added a Spectrum React Button. But the onPress event does not work, only the onClick works.

import React from "react";

import { WC } from "./WC.jsx";

import "./Home.css";
import { Button, Provider, darkTheme } from "@adobe/react-spectrum";

export const Home = () => {
  const handleXDButton = () => {
    console.log("WORK");
  };
  return (
    <div>
      <WC>
        <Provider theme={darkTheme} colorScheme="dark">
          <p className="display">
            Congratulations! You just created your first React Plugin.
          </p>
          <Button variant="primary" onPress={handleXDButton}>
            XD
          </Button>
        </Provider>
      </WC>
    </div>
  );
};

import { Button, Provider, darkTheme } from "@adobe/react-spectrum";

Perhaps UXP does not support React Spectrum. If it is Spectrum Web Components, you can use it with a lot of effort.

And UXP is generally based on the context of web development and uses onClick.

what you mean is that although adobe in its UXP Developer Tools gives the option to create a react based project, it does not ensure compatibility with its own Spectrum react components?
Actually all this has me very confused, the Adobe documentation for this is terrible! Can you recommend me the right way to set up a project to develop a plugin for InDesign?

it does not ensure compatibility with its own Spectrum react components?

This is true. Perhaps what you are calling ‘Spectrum react components’ is React Spectrum. But this is not ensured to work.

UXP is like a browser, but a bit different, and some of its features are not supported. Therefore, it often doesn’t work.

If you want to use Spectrum Web Components instead of React Spectrum, the following documentation and templates are available.

Documentation

Template