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

@damianobarbati/react-update

Package Overview
Dependencies
Maintainers
1
Versions
12
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@damianobarbati/react-update

react-update

  • 1.0.11
  • unpublished
  • npm
  • Socket score

Version published
Weekly downloads
0
Maintainers
1
Weekly downloads
 
Created
Source

react-update

Less verbose alternative to default componentShouldUpdate.

Usage

yarn add @damianobarbati/react-update

import update from '@damianobarbati/react-update'
@update([path, path, path...]) //if any of this props changes then update component
export default class MyComponent extends React.Component {

Webpack

You are probably excluding modules imported from node_modules to babel-loader no-matter-what. Truth is you should look for jsnext:main entry and compile ESx modules into your environment. Easy as switching from:

rules: [{
    test: /\.(js|mjs)$/i,
    exclude: /node_modules/
    use: [{
        loader: 'babel-loader',
    }]
}]    

to this:

rules: [{
    test: /\.(js|mjs)$/i,
    exclude: filename => {
        if(!filename.includes('node_modules'))
            return false;
        const packageFile = filename.replace(/(.+node_modules\/)(@.+?\/)?(.+?\/)(?:.+)?/, '$1$2$3package.json');
        const pkg = require(packageFile);
        return !pkg['jsnext:main'];
    },
    use: [{
        loader: 'babel-loader',
    }]
}]

FAQs

Package last updated on 03 Jul 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