MetaMask / MetaMask/contributor-docs

Create React Best Practices Documentation

Open
#1 1 comment 0 reactions 0 assignees View on GitHub
category-documentation github-migration-triaged team-wallet-framework wf-documentation
Dominant language
JavaScript
Stars
86
Forks
42
PR merge metrics
No merged PRs in 30d

Description

The extension code base has several patterns of component structures in it, some of which are deprecated while others are the current promoted way of writing react components. The purpose of this document is to encapsulate all of our best practices such that a new contributor is not guessing on the appropriate way to build components (as well as how to do the other parts of React, such as contexts, hooks, etc).

This document is product *agnostic* and will need to have members of both @MetaMask/extension-devs and @MetaMask/mobile-devs weigh in on the final document to make sure that it properly reflects shared principles. The document that fulfills this ticket need not be a reflection of the current state of the products, either. If during discussion we agree upon a shared best practice across products but one product team has not yet implemented any instances of that best practice, that is fine. Documentation that is created in this repo is subject to change, approval and ratification of updates.

Contributor guide

Open the contributing guide

Research direction

Start by reviewing the existing React component, context, and hook patterns in the extension and mobile codebases, noting deprecated and currently promoted approaches. Prepare a product-agnostic draft for input from both @MetaMask/extension-devs and @MetaMask/mobile-devs, then confirm that the shared practices are approved and ratified.

Written by the indexing model from the issue text.

Assessment

Tech stack
react
Domain
documentation
Issue type
Documentation
Difficulty
5/5
Estimated time
Over a week
Activity status
Quiet
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.