Skip to content

Commit

Permalink
Update React Tutorial (Part 2 "Multi-component Global State") (#1330)
Browse files Browse the repository at this point in the history
* clear out part 2 "global" tutorial steps, make some changes to the local tutorials ending to better reference what is coming in part 2.

* update wallet-sidebar

* update file structure

* updates to local and global state tutorial for part 2 release

* Fix sidebar and add types and interfaces to dapp tutorial

* initial minor copy edits

* Start the context provider section

* update context section following preferred format and language

* add more explanation of context component

* abbreviating some of the

* finish the text of the tutoiral. Only the addition of images is left before fina review

* Add placeholders for images

* update css instructions

* Add missing Utility file

* remove comments in code, detail in text

* Vast changes to grammar, typos, rewording, reduction of text and such

* fix broken link to EIP-6963

* Add images and update text

* update image routes

* update image

* initial review and copy edits

* fix import

* Code formatting

* copy edits

* Update react-dapp-global-state.md

some edits

* initial pass

* edit content

* minor edit

* format changes

---------

Co-authored-by: Joan E <153745173+joaniefromtheblock@users.noreply.github.com>
Co-authored-by: Alexandra Tran <alexandratran@protonmail.com>
  • Loading branch information
3 people authored Jun 20, 2024
1 parent 265ee30 commit 1afcb63
Show file tree
Hide file tree
Showing 9 changed files with 629 additions and 452 deletions.
6 changes: 6 additions & 0 deletions docs/whats-new.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,9 @@ of the [MetaMask developer page](https://metamask.io/developer/).

## June 2024

- Updated [React dapp with global state tutorial](/wallet/tutorials/react-dapp-global-state) with
instructions for EIP-6963.
([#1330](https://github.com/MetaMask/metamask-docs/pull/1330))
- Documented that the Gas API can be [called without an API key secret](/services/gas-api/api-reference). ([#1346](https://github.com/MetaMask/metamask-docs/pull/1346))
- Updated [Snaps resources](/snaps/learn/resources) and added a new section "Snaps for developers." ([#1329](https://github.com/MetaMask/metamask-docs/pull/1329))
- Documented [how to allow automatic connections to a Snap](/snaps/how-to/allow-automatic-connections).
Expand All @@ -22,6 +25,9 @@ of the [MetaMask developer page](https://metamask.io/developer/).
([#1276](https://github.com/MetaMask/metamask-docs/pull/1276))
- Discontinued support for [`eth_sign`](/wallet/concepts/signing-methods/#eth_sign).
([#1319](https://github.com/MetaMask/metamask-docs/pull/1319/))
- Updated [React dapp with local state tutorial](/wallet/tutorials/react-dapp-local-state) with
instructions for EIP-6963.
([#1299](https://github.com/MetaMask/metamask-docs/pull/1299))
- Documented [Snaps initial connections](/snaps/reference/permissions/#initial-connections).
([#1318](https://github.com/MetaMask/metamask-docs/pull/1318/))
- Updated [Snaps allowlisting guide](/snaps/how-to/get-allowlisted) with open permissions.
Expand Down
11 changes: 1 addition & 10 deletions wallet-sidebar.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,16 +21,7 @@ const sidebar = {
type: "category",
label: "Tutorials",
link: { type: "generated-index", slug: "/tutorials" },
items: [
{
type: "doc",
id: "tutorials/react-dapp-local-state",
},
{
type: "doc",
id: "tutorials/javascript-dapp-simple",
},
],
items: [{ type: "autogenerated", dirName: "tutorials" }],
},
{
type: "category",
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 0 additions & 2 deletions wallet/tutorials/javascript-dapp-simple.md
Original file line number Diff line number Diff line change
Expand Up @@ -86,10 +86,8 @@ Update `index.html` to include the script:
### 3. Detect MetaMask

:::caution

The `@metamask/detect-provider` module is deprecated, and is only used here for educational purposes.
In production environments, we recommend [connecting to MetaMask using EIP-6963](../how-to/connect/index.md).

:::

Install the `@metamask/detect-provider` module in your project directory:
Expand Down
Loading

0 comments on commit 1afcb63

Please sign in to comment.