news.volyx.in

Introducing react.dev (react.dev)

748 points by clessg · 1264 days ago · 468 comments on HN

Article summary

The React team has launched a new website, react.dev, which serves as the new home for React and its documentation. The site features a revamped design, interactive examples, and a focus on modern React with function components and Hooks. The previous React documentation site has been archived at legacy.reactjs.org. The new site aims to provide a better learning experience for users, with a self-paced course, API reference, and challenges to check understanding.

Main themes

  • React documentation
  • Modern React
  • Function components vs class components
  • State management
  • Hooks
  • Code organization
  • Learning resources
  • Tooling and integration

What commenters say

  • Some users appreciate the new design and interactive examples, finding them to be an improvement over the old site.
  • Others have experienced issues with scrolling and code windows on the new site.
  • There is a debate about the use of class components versus functional components, with some arguing that class components are more suitable for complex logic and others preferring functional components for simplicity.
  • Some users have found that using Hooks can lead to messy code and prefer to use class components or other approaches, such as useReducer, to manage state.
  • The React team suggests using a combination of classes and Hooks to manage complex logic and state.
  • Some users are interested in exploring alternative approaches to state management, such as using a state machine or a library like use-structure.
  • There is a discussion about the trade-offs between using useReducer and useState, with some arguing that useReducer is more boilerplate-heavy but provides more control.
  • Some users believe that React apps should contain less React-specific code and that a deeper vertical integration in tooling can be beneficial.