Big update!Introducing GitHub Bot Commands. Learn more
Socket
BlogLoveLog in
Book a demo

react

Package Overview
Dependencies
1
Maintainers
7
Versions
1052
Issues
File Explorer

Advanced tools

react

React is a JavaScript library for building user interfaces.

    18.2.0latest

Version published
Maintainers
7
Weekly downloads
13,500,769
decreased by-20.67%

Weekly downloads

Changelog

Source

18.2.0 (June 14, 2022)

React DOM

  • Provide a component stack as a second argument to onRecoverableError. (@gnoff in #24591)
  • Fix hydrating into document causing a blank page on mismatch. (@gnoff in #24523)
  • Fix false positive hydration errors with Suspense. (@gnoff in #24480 and @acdlite in #24532)
  • Fix ignored setState in Safari when adding an iframe. (@gaearon in #24459)

React DOM Server

  • Pass information about server errors to the client. (@salazarm and @gnoff in #24551 and #24591)
  • Allow to provide a reason when aborting the HTML stream. (@gnoff in #24680)
  • Eliminate extraneous text separators in the HTML where possible. (@gnoff in #24630)
  • Disallow complex children inside <title> elements to match the browser constraints. (@gnoff in #24679)
  • Fix buffering in some worker environments by explicitly setting highWaterMark to 0. (@jplhomer in #24641)

Server Components (Experimental)

  • Add support for useId() inside Server Components. (@gnoff) in #24172

Readme

Source

react

React is a JavaScript library for creating user interfaces.

The react package contains only the functionality necessary to define React components. It is typically used together with a React renderer like react-dom for the web, or react-native for the native environments.

Note: by default, React will be in development mode. The development version includes extra warnings about common mistakes, whereas the production version includes extra performance optimizations and strips all error messages. Don't forget to use the production build when deploying your application.

Usage

import { useState } from 'react'; import { createRoot } from 'react-dom/client'; function Counter() { const [count, setCount] = useState(0); return ( <> <h1>{count}</h1> <button onClick={() => setCount(count + 1)}> Increment </button> </> ); } const root = createRoot(document.getElementById('root')); root.render(<App />);

Documentation

See https://reactjs.org/

API

See https://reactjs.org/docs/react-api.html

Keywords

FAQs

What is react?

React is a JavaScript library for building user interfaces.

Is react popular?

The npm package react receives a total of 10,352,163 weekly downloads. As such, react popularity was classified as popular.

Is react well maintained?

We found that react demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago.It has 7 open source maintainers collaborating on the project.

Last updated on 14 Jun 2022
Socket

Product

Subscribe to our newsletter

Get open source security insights delivered straight into your inbox. Be the first to learn about new features and product updates.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc