You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
consttitle='Web3-Onboard | The easy way to connect web3 users to dapps'
28
-
constmetadescription='Open-source, framework-agnostic JavaScript library to onboard users to web3 apps. Help your users transact with ease by enabling wallet connection, real-time transaction states, and more.'
28
+
constmetadescription=
29
+
'Open-source, framework-agnostic JavaScript library to onboard users to web3 apps. Help your users transact with ease by enabling wallet connection, real-time transaction states, and more.'
Copy file name to clipboardExpand all lines: docs/src/routes/docs/[...1]overview/[...3]onboard.js-migration-guide.md
+13-10Lines changed: 13 additions & 10 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -13,23 +13,23 @@ With Web3-Onboard, we’ve introduced significant architectural changes that pro
13
13
14
14
If you have bnc-onboard installed, you will need to install web3-onboard instead. The basic steps you need to take to get started are:
15
15
16
-
1. Install `npm i @web3-onboard/core`. You can then go ahead and install other specific wallet modules you want.
16
+
1. Install `npm i @web3-onboard/core`. You can then go ahead and install other specific wallet modules you want (most likely `npm i @web3-onboard/injected-wallets` for browser wallet support).
17
17
2. Initialize Onboard with the wallets you’ve installed along with the networks you would like to support.
18
18
3. Make use of our API actions like `await onboard.connectWallet()` to allow a user to connect their wallets.
19
19
20
20
For a full code overview of the upgrade process using the React Hooks package please see [this PR](https://github.com/blocknative/react-demo/pull/160/files) with special attention to the `App.js` and `services.js` files.
21
-
To help you get started quickly on any framework you're using, we’ve put together [a quickstart that includes the above-mentioned steps](https://docs.blocknative.com/onboard#quickstart).
21
+
To help you get started quickly we’ve put together [a set of examples across multiple frameworks that includes the above-mentioned steps](https://github.com/blocknative/web3-onboard/tree/v2-web3-onboard-develop/examples).
22
22
23
23
### Package Upgrade - Modularization
24
24
25
25
This is the biggest change you might experience as an onboard.js user. With Web3-Onboard, we’ve separated all supported wallets into their modules, meaning you only need to integrate specific wallet modules you intend to support in your app.
26
-
For example with Onboard, if you wanted to support only Metamask and Coinbase in your app, you had to install Onboard complete with all other wallets: npm install bnc-onboard
26
+
For example with Onboard, if you wanted to support only Metamask and Coinbase in your app, you had to install Onboard complete with all other wallets: `npm install bnc-onboard`.
27
27
With Web3-Onboard, you only need to install core along with the desired wallet modules: `npm i @web3-onboard/core @web3-onboard/injected-wallets @web3-onboard/coinbase`
28
28
This change allows us to support many web3 wallets without affecting the overall library performance.
29
29
30
30
### Expansive Initialization Options
31
31
32
-
We’ve made initialization simpler while introducing more powerful options like [Account Center](https://www.blocknative.com/blog/multichain-and-multiwallet-account-management-on-your-dapp-with-account-center) and Notify in web3-onboard.
32
+
We’ve made initialization simpler while introducing more powerful options like [Account Center](https://www.blocknative.com/blog/multichain-and-multiwallet-account-management-on-your-dapp-with-account-center) and Notify in Web3-Onboard.
33
33
Onboard now requires two compulsory initial setup options: `wallets` (Wallet modules, as shown above, to be initialized and added to wallet selection modal) and `chains` (EVM networks your app should work with). You can also pass multiple wallets and chains.
34
34
35
35
```
@@ -46,7 +46,7 @@ const onboard = Onboard({
46
46
})
47
47
```
48
48
49
-
You can find the full list of initialization options in our docs here.
49
+
You can find the full list of initialization options in our docs [here](/docs/packages/core#options).
50
50
51
51
### API Upgrades
52
52
@@ -55,15 +55,15 @@ Now, you only need to call the connectWallet API:
55
55
56
56
`await onboard.connectWallet()`
57
57
58
-
Learn more about state changes tracked with the Onboard API here and the exposed actions you can use to modify the state here.
58
+
Learn more about state changes tracked with the Onboard API [here](/docs/packages/core#state) and the exposed actions you can use to modify the state [here](/docs/packages/core#actions-to-modify-state).
59
59
60
60
### Framework Support
61
61
62
62
Although Onboard is still framework-agnostic, we’ve introduced a couple of framework-specific modules that are frequently asked for by our users.
63
63
64
-
`@web3-onboard/react` - React Hooks to connect users to web3 dApps better. You can check out [a comprehensive React Hooks guide](https://www.blocknative.com/blog/react-hooks-ethereum) we've written on that.
64
+
`@web3-onboard/react` - React Hooks to connect users to web3 dApps better. You can check out [a comprehensive React Hooks guide](https://www.blocknative.com/blog/react-hooks-ethereum) we've written on it.
65
65
66
-
`@web3-onboard/vue` - A set of reusable functions for integrating Web3-Onboard into a Vue 3 project. This is also compatible with a Vue 2 + composition-api dapp.
66
+
`@web3-onboard/vue` - A set of reusable functions for integrating Web3-Onboard into a Vue 3 project. This is also compatible with a Vue 2 + composition-api dApp.
67
67
68
68
### CSS Customizations
69
69
@@ -89,7 +89,7 @@ We've also added more expansive custom CSS properties so you can style every par
89
89
}
90
90
```
91
91
92
-
The full list of CSS variables for web3-onboard are available here.
92
+
The full list of CSS variables for web3-onboard are available [here](/docs/packages/core#custom-styling).
93
93
94
94
### Other Important Changes
95
95
@@ -98,4 +98,7 @@ There are also other notable infrastructural changes in Web3-Onboard:
98
98
- Dynamic Imports of dependencies
99
99
- Wallet Provider Standardization
100
100
- Support for Chain ID in decimal format
101
-
- If you have questions or requests, please feel free to drop by the [community-support discord channel](https://discord.com/channels/542403978693050389/542406894677917699) or [create a PR or issue on GitHub](https://github.com/blocknative/web3-onboard/issues/new/choose).
101
+
102
+
### Questions and Requests
103
+
104
+
If you have questions or requests, please feel free to drop by the [community-support discord channel](https://discord.com/channels/542403978693050389/542406894677917699) or [create a PR or issue on GitHub](https://github.com/blocknative/web3-onboard/issues/new/choose).
0 commit comments