Challenge: Creating a React Component

Test yourself by creating a React component and checking the connectivity of the wallet.

Problem statement

For this challenge, complete the following tasks:

  • Write a React component called WalletMessage that includes a button and a paragraph.
  • When clicked, the button checks if a wallet exists. If a wallet exists, the paragraph displays a message that reads Wallet is connected. It reads Wallet is not connected if it doesn’t exist.

Input

This challenge doesn’t need any input.

Output

This challenge will output a button and a paragraph to inform us of the connectivity status of the wallet.

Get hands-on with 1400+ tech skills courses.