Socket
Socket
Sign inDemoInstall

react-refresh

Package Overview
Dependencies
0
Maintainers
7
Versions
1645
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    react-refresh

React is a JavaScript library for building user interfaces.


Version published
Weekly downloads
14M
increased by2.34%
Maintainers
7
Install size
51.3 kB
Created
Weekly downloads
 

Package description

What is react-refresh?

The react-refresh package is used to enable fast refresh capabilities in React applications. Fast Refresh is a feature that allows you to get instant feedback for changes in your React components. With Fast Refresh enabled, most edits should be visible within a second, without losing component state. This leads to a more productive development experience by allowing developers to see changes almost instantly.

What are react-refresh's main functionalities?

Hot Reloading

This code enables hot reloading for a React component. When changes are made to the 'App' component, it will be reloaded without refreshing the entire page, preserving the application state.

if (module.hot) {
  module.hot.accept('./App', () => {
    const NextApp = require('./App').default;
    ReactDOM.render(<NextApp />, document.getElementById('root'));
  });
}

Other packages similar to react-refresh

Changelog

Source

0.5.0 (October 16, 2013)

React

  • Memory usage improvements - reduced allocations in core which will help with GC pauses
  • Performance improvements - in addition to speeding things up, we made some tweaks to stay out of slow path code in V8 and Nitro.
  • Standardized prop -> DOM attribute process. This previously resulting in additional type checking and overhead as well as confusing cases for users. Now we will always convert your value to a string before inserting it into the DOM.
  • Support for Selection events.
  • Support for Composition events.
  • Support for additional DOM properties (charSet, content, form, httpEquiv, rowSpan, autoCapitalize).
  • Support for additional SVG properties (rx, ry).
  • Support for using getInitialState and getDefaultProps in mixins.
  • Support mounting into iframes.
  • Bug fixes for controlled form components.
  • Bug fixes for SVG element creation.
  • Added React.version.
  • Added React.isValidClass - Used to determine if a value is a valid component constructor.
  • Removed React.autoBind - This was deprecated in v0.4 and now properly removed.
  • Renamed React.unmountAndReleaseReactRootNode to React.unmountComponentAtNode.
  • Began laying down work for refined performance analysis.
  • Better support for server-side rendering - react-page has helped improve the stability for server-side rendering.
  • Made it possible to use React in environments enforcing a strict Content Security Policy. This also makes it possible to use React to build Chrome extensions.

React with Addons (New!)

  • Introduced a separate build with several "addons" which we think can help improve the React experience. We plan to deprecate this in the long-term, instead shipping each as standalone pieces. Read more in the docs.

JSX

  • No longer transform class to className as part of the transform! This is a breaking change - if you were using class, you must change this to className or your components will be visually broken.
  • Added warnings to the in-browser transformer to make it clear it is not intended for production use.
  • Improved compatibility for Windows
  • Improved support for maintaining line numbers when transforming.

Readme

Source

react-refresh

This is an experimental package for hot reloading.

Its API is not as stable as that of React, React Native, or React DOM, and does not follow the common versioning scheme.

Use it at your own risk.

Keywords

FAQs

Last updated on 27 Sep 2019

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc