SuperAPI AI Directory

react-best-practices

Frontend & websites

View repository

Updated 10-15 20:10

About this skill

React Best Practices

Treat React as a declarative projection of owned state: derive what can be calculated, render every state explicitly, and isolate effects to synchronization with external systems so components remain predictable and easy to change.

Library Sources

  • GitHub repository ID: react/react
  • Context7 library ID: /facebook/react
  • DeepWiki repository ID: react/react

Use Context7 for current documentation and DeepWiki for implementation details.

References

Read the references that apply to the current task before writing or reviewing React component, state, rendering, effect, data-loading, or form code.

  1. Own mutable state narrowly and derive every value that its inputs already prove.
  2. Render explicit states and compose components around their owned contracts.
  3. Restrict effects and memoization to their actual ownership boundaries.
  4. Treat form input and submission state as form-wide contracts.