useDApp is a framework designed for rapid dApp development, built using the Ethereum blockchain and React. UseDApp makes it simple to implement features such as connecting your wallet, switching between networks, and tracking transaction history within your dApp. It offers a number of templates and example apps to help you get started.
Read below to learn how to create a dApp using useDApp and IPFS.
Select ‘Create Bucket’ in the top right corner to create a new bucket.
3. Enter a bucket name and choose the IPFS storage network to create the bucket.
Bucket names must be unique across all Filebase users, be between 3 and 63 characters long, and can contain only lowercase characters, numbers, and dashes.
4. Next, upload some images you’d like to display on your dApp.
These can be icons, photographs, or pieces of artwork. In this tutorial, we’ll upload a logo, a photograph, and a piece of art, for a total of 3 objects.
5. Take note of the CID for each of these objects.
The CID can be found under the ‘CID’ column, or from within the metadata of each object. We’ll reference these objects by their CID within our dApp.
6. Open a terminal or command-line interface.
Enter the following yarn command to create a new directory called my-dapp and install the default files for an Ethereum dApp:
yarn create eth-app my-dapp
7. Start your dApp with the following command:
yarn react-app:start
8. Your app will be running at http://localhost:3000.
By default, it’ll look like this:
9. Navigate to the my-dapp/packages/react-app/src/App.js file.
Open this file in your preferred IDE to edit. Replace the existing content with the following:
Replace the values IPFS_CID with the CIDs from the IPFS objects you uploaded to Filebase.
Here’s what your app should look like after:
The exciting thing about this dApp is that it includes the functionality to connect your wallet to the app, as seen by the ‘Connect Wallet’ button in the top right corner.
This means that from here, you can design a dApp that utilizes this button, allowing users to connect their wallet to the app and display assets, check wallet balances, and even send transactions!