Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

react-hmr

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-hmr

The react hot loader for hmr wrapping react-hot-loader

  • 0.1.1
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
128
decreased by-26.86%
Maintainers
1
Weekly downloads
 
Created
Source

react-hmr

Dependency Status devDependency Status NPM Version

The AMD wrapper of react-hot-loader@next for react HMR

How to use

Install

npm install react-hmr --save-dev

Usage

  • DEV ENV

    1. Preload dist/react-hot-loader.dev.js or dist/react-hot-loader.dev.min.js compress version

    2. Update your React app entry code:

      • import/require patch and AppContainer as the React.Component proxy, the patch should execute before the app startup
      • use the AppContainer component wrap your app root component
      import patch from 'react-hot-loader/patch';
      import AppContainer from 'react-hot-loader/lib/AppContainer';
      
      import React from 'react';
      import ReactDOM from 'react-dom';
      import App from './App';
      
      const store = {
          name: 'react'
      };
      ReactDOM.render(
          <AppContainer>
              <App></App>
          </AppContainer>,
          document.getElementById('app')
      );
      
  • PROD ENV

    Like DEV ENV, except for preload dist/react-hot-loader.prod.js or dist/react-hot-loader.prod.min.js compress version.

Reference

Keywords

FAQs

Package last updated on 02 Mar 2017

Did you know?

Socket

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
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc