Using Renow Appkit and Solan in Pure Javascript
As a beginner in the world of blockchain development, it is not uncommon to find unknown concepts and technology. In this article, we deepen how to implement Appkit Renown and Solana Adapter in Pure Javascript, which covers the latest versions of both libraries.
What is appkit to replace?
Renown Appkit is a popular library for applications based on building blocks in the Solana block. It allows developers to create decentralized applications (DAPP) using React or other libraries without requireing extensive knowledge of the specific development of Solana.
Solana adapter
Solana adapter is an extension of Renown Appkit, which allows perfect integration with Solana. With this adapter, you can compile a DAPP in Solana, using its unique features and benefits.
Pure Implementation JavaScript
If you want to use a renowned appkit and a single JavaScript adapter, follow the following steps:
Step 1: Install the desired libraries
First install the necessary libraries with NPM or thread:
`Bash
NPM Install Renewn-Appkit @Solana/Web3.JS
nor
`Bash
Yarn ADD Decision to issue
Step 2: Configure a solar client
Create a new file config.json
and add details about the Solana network:
`Json
{
"grid": {{
"Name": "Testnet",
"ID": "Your_solana_network_id"
}
}
Replace your_solana_network_id
for the ID of its selected Solan network.
Step 3: Create a new JavaScript project
Create a new directory for your project and initialize a new Node.JS project using NPX Create -React -App My -App
.
Step 4: Install the Appkit installation adapter
Install Appkit Rege adapter with NPM or thread:
`Bash
NPM Install an adapter-app-app-app-Solana
nor
`Bash
Add an adapter adapter fiber to the adapter adapter
Step 5: Import Appkit adapter and solana
In the “app.js" file, import the required libraries:
Jsx
Imports of reaction "React";
Import {CreateApp} from 'renewn -Appkit';
Import {Solanadapter} “Renewn-Appkit-Solana-Adaptor”;
Const App = () => {
return (
My app
connection to Solana ...
React.Createment (
Solanadapter,
{Network: This.props.Network}
)
zero
)}>
Connect to Solane
was>
);
};
Export the default application;
Step 6: Create a new React component
Create a new file solanaconnector.js
and add the following code:
`Jsx
Import {Solanadapter} “Renewn-Appkit-Solana-Adaptor”;
Const Solanaconnect = () => {
return (
Solana Connector
connection to Solana ...
React.Createment (
Solanadapter,
{Network: This.props.Network}
)
zero
)}>
Connect to Solane
was>
);
};
Export predetermined exports of Selean;
Step 7: Integrate Appkit adapter and Solan Remollection Adapter
In your file app.js
, component ‘Solanaconnectorand add it as a childhood:
` Jsx
Imports of reaction “React”;
Import {CreateApp} from ‘renewn -Appkit’;
Import Solanacon Baddor z ‘./solanaConnector’;
Const App = () => {
return (
My app
connection to Solana …
React.Createment (
Solanacon Nector,
{Red: this.props.