Socket
Socket
Sign inDemoInstall

react-refresh

Package Overview
Dependencies
0
Maintainers
10
Versions
1560
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
Maintainers
10
Install size
57.3 kB
Created

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.14.2 (November 2, 2015)

React DOM

  • Fixed bug with development build preventing events from firing in some versions of Internet Explorer & Edge
  • Fixed bug with development build when using es5-sham in older versions of Internet Explorer
  • Added support for integrity attribute
  • Fixed bug resulting in children prop being coerced to a string for custom elements, which was not the desired behavior
  • Moved react from dependencies to peerDependencies to match expectations and align with react-addons-* packages

Readme

Source

react-refresh

This package implements the wiring necessary to integrate Fast Refresh into bundlers. Fast Refresh is a feature that lets you edit React components in a running application without losing their state. It is similar to an old feature known as "hot reloading", but Fast Refresh is more reliable and officially supported by React.

This package is primarily aimed at developers of bundler plugins. If you’re working on one, here is a rough guide for Fast Refresh integration using this package.

Keywords

FAQs

Last updated on 26 Apr 2024

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

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc