Gathering detailed insights and metrics for react-app-rewire-hot-loader
Gathering detailed insights and metrics for react-app-rewire-hot-loader
Gathering detailed insights and metrics for react-app-rewire-hot-loader
Gathering detailed insights and metrics for react-app-rewire-hot-loader
npm install react-app-rewire-hot-loader
Module System
Min. Node Version
Typescript Support
Node Version
NPM Version
213 Stars
33 Commits
15 Forks
4 Watching
1 Branches
10 Contributors
Updated on 07 Mar 2024
Minified
Minified + Gzipped
JavaScript (100%)
Cumulative downloads
Total Downloads
Last day
-28.3%
1,070
Compared to previous day
Last week
-17.9%
6,690
Compared to previous week
Last month
7.3%
33,512
Compared to previous month
Last year
-32.7%
392,884
Compared to previous year
1
react-app-rewire-hot-loader
Add the react-hot-loader
to your create-react-app
app via react-app-rewired
.
Because who wants their app, state, and styles automatically reloading all the time?
1npm install --save react-app-rewire-hot-loader 2 3# If you don't already, you also need: 4npm install --save react-app-rewired 5npm install --save react-hot-loader
config-overrides.js
of the root of your project you created for react-app-rewired
add this code:1const rewireReactHotLoader = require('react-app-rewire-hot-loader') 2 3/* config-overrides.js */ 4module.exports = function override (config, env) { 5 config = rewireReactHotLoader(config, env) 6 return config 7}
Mark your root component as hot-exported:
1// App.js - react-hot-loader >= 4.5.4 2import React from 'react' 3import { hot } from 'react-hot-loader/root' 4 5const App = () => <div>Hello World!</div> 6 7export default process.env.NODE_ENV === "development" ? hot(App) : App
Old version: Prior to react-hot-loader version 4.5.4. you needed to write hot(module)(App)
.
react-hot-loader recommends to use the latest syntax as "it is much more resilient to js errors you may make during development."
1// App.js - react-hot-loader < 4.5.4 2import React from 'react' 3import { hot } from 'react-hot-loader' 4 5const App = () => <div>Hello World!</div> 6 7export default process.env.NODE_ENV === "development" ? hot(module)(App) : App
1 "scripts": { 2 "start": "react-app-rewired start", 3 "build": "react-app-rewired build", 4 "test": "react-app-rewired test --env=jsdom", 5 "eject": "react-app-rewired eject" 6 },
That's it, you now have hot reloads!
Licensed under the MIT License, Copyright ©️ 2017 Chris Harris. See LICENSE.md for more information.
No vulnerabilities found.
Reason
no binaries found in the repo
Reason
0 existing vulnerabilities detected
Reason
license file detected
Details
Reason
Found 11/16 approved changesets -- score normalized to 6
Reason
0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0
Reason
no effort to earn an OpenSSF best practices badge detected
Reason
security policy file not detected
Details
Reason
project is not fuzzed
Details
Reason
branch protection not enabled on development/release branches
Details
Reason
SAST tool is not run on all commits -- score normalized to 0
Details
Score
Last Scanned on 2024-11-25
The Open Source Security Foundation is a cross-industry collaboration to improve the security of open source software (OSS). The Scorecard provides security health metrics for open source projects.
Learn More