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

@cfcs/react

Package Overview
Dependencies
Maintainers
1
Versions
29
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@cfcs/react - npm Package Compare versions

Comparing version 0.0.15-beta.1 to 0.0.15-beta.2

13

dist/cfcs.cjs.js

@@ -7,3 +7,3 @@ /*

repository: https://github.com/naver/cfcs
version: 0.0.15-beta.0
version: 0.0.15-beta.2
*/

@@ -71,8 +71,13 @@ 'use strict';

// eslint-disable-next-line react-hooks/rules-of-hooks
var listener = react.useMemo(function () {
adaptResult.on(name, callback);
return callback;
}, dependencies);
react.useEffect(function () {
adaptResult.on(name, callback);
adaptResult.off(name, listener);
adaptResult.on(name, listener);
return function () {
adaptResult.off(name, callback);
adaptResult.off(name, listener);
}; // eslint-disable-next-line react-hooks/exhaustive-deps
}, dependencies);
}, [listener]);
};

@@ -79,0 +84,0 @@ });

@@ -7,3 +7,3 @@ /*

repository: https://github.com/naver/cfcs
version: 0.0.15-beta.0
version: 0.0.15-beta.2
*/

@@ -69,8 +69,13 @@ import { adaptReactive, keys, camelize } from '@cfcs/core';

// eslint-disable-next-line react-hooks/rules-of-hooks
var listener = useMemo(function () {
adaptResult.on(name, callback);
return callback;
}, dependencies);
useEffect(function () {
adaptResult.on(name, callback);
adaptResult.off(name, listener);
adaptResult.on(name, listener);
return function () {
adaptResult.off(name, callback);
adaptResult.off(name, listener);
}; // eslint-disable-next-line react-hooks/exhaustive-deps
}, dependencies);
}, [listener]);
};

@@ -77,0 +82,0 @@ });

{
"name": "@cfcs/react",
"version": "0.0.15-beta.1",
"version": "0.0.15-beta.2",
"description": "Cross Framework Components",

@@ -35,3 +35,3 @@ "main": "dist/cfcs.cjs.js",

"dependencies": {
"@cfcs/core": "0.0.15-beta.1"
"@cfcs/core": "0.0.15-beta.2"
},

@@ -38,0 +38,0 @@ "devDependencies": {

@@ -71,9 +71,16 @@ import { ReactiveSubscribe, ReactiveAdapter, keys, camelize, adaptReactive } from "@cfcs/core";

// eslint-disable-next-line react-hooks/rules-of-hooks
const listener = useMemo(() => {
adaptResult.on(name as any, callback as any);
return callback;
}, dependencies);
useEffect(() => {
adaptResult.on(name as any, callback as any);
adaptResult.off(name as any, listener as any);
adaptResult.on(name as any, listener as any);
return () => {
adaptResult.off(name as any, callback as any);
adaptResult.off(name as any, listener as any);
};
// eslint-disable-next-line react-hooks/exhaustive-deps
}, dependencies);
}, [listener]);
};

@@ -80,0 +87,0 @@ });

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

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