Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

'XXX' cannot be used as a JSX component. #20

Open
happyeric77 opened this issue Oct 25, 2023 · 0 comments
Open

'XXX' cannot be used as a JSX component. #20

happyeric77 opened this issue Oct 25, 2023 · 0 comments

Comments

@happyeric77
Copy link

happyeric77 commented Oct 25, 2023

I am coming across an issue that the following error is thrown when I import @pontem/aptos-wallet-adapter

Situation

All the React Function Component gets the following error

'XXX' cannot be used as a JSX component.
  Its return type 'ReactElement<any, string | JSXElementConstructor<any>> | null' is not a valid JSX element

Reproduction

  1. Clone the repo
    git clone [email protected]:notifi-network/notifi-sdk-ts.git

  2. Install @pontem/aptos-wallet-adapter to @notifi-network/notifi-react-example package

cd notifi-sdk-ts
npm install
npx lerna --scope=@notifi-network/notifi-react-example run install  @pontem/aptos-wallet-adapter
  1. get into the packages/notifi-react-example/src/App.tsx and import @pontem/aptos-wallet-adapter
// ...
import  '@pontem/aptos-wallet-adapter'; 
// ...

The error below will be shown only by importing @pontem/aptos-wallet-adapter without doing anything

Screenshot 2023-10-25 at 15 57 18

All the JSX components become showing the same error 'XXX' cannot be used as a JSX component.

Could anybody give me a hint on how to get it around

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant