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

@goldfishjs/reactive-connect

Package Overview
Dependencies
Maintainers
2
Versions
146
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@goldfishjs/reactive-connect - npm Package Compare versions

Comparing version 2.4.1 to 2.4.2

11

CHANGELOG.md

@@ -6,2 +6,13 @@ # Change Log

## [2.4.2](https://github.com/alipay/goldfish/compare/v2.4.1...v2.4.2) (2022-03-01)
### Bug Fixes
* props sync ([64402c4](https://github.com/alipay/goldfish/commit/64402c4c978392e58e5ad58477c5d1c13a85a60b))
## [2.4.1](https://github.com/alipay/goldfish/compare/v2.4.0...v2.4.1) (2022-02-28)

@@ -8,0 +19,0 @@

23

lib/createMiniComponent.js

@@ -29,13 +29,22 @@ import _connect from "@goldfishjs/reactive/lib/connect";

function syncProps() {
for (var key in this.props) {
if (key in this.store.props) {
this.store.props[key] = this.props[key];
function syncProps(lifeCycleName) {
return function () {
var nextProps = {
onInit: this.props,
didMount: this.props,
deriveDataFromProps: arguments.length <= 0 ? undefined : arguments[0],
didUpdate: this.props
}[lifeCycleName];
for (var key in nextProps) {
if (key in this.store.props) {
this.store.props[key] = nextProps[key];
}
}
}
};
}
attachLogic(componentOptions, enterKey, 'after', syncProps);
attachLogic(componentOptions, enterKey, 'after', syncProps(enterKey));
var refreshKey = isComponent2 ? 'deriveDataFromProps' : 'didUpdate';
attachLogic(componentOptions, refreshKey, 'after', syncProps);
attachLogic(componentOptions, refreshKey, 'after', syncProps(refreshKey));
attachLogic(componentOptions, leaveKey, 'after', function () {

@@ -42,0 +51,0 @@ this.store && (this.store.isSyncDataSafe = false);

{
"name": "@goldfishjs/reactive-connect",
"version": "2.4.1",
"version": "2.4.2",
"description": "goldfish-reactive-connect",

@@ -17,5 +17,5 @@ "main": "lib/index.js",

"dependencies": {
"@goldfishjs/module-usage": "^2.4.1",
"@goldfishjs/reactive": "^2.4.1",
"@goldfishjs/utils": "^2.4.1",
"@goldfishjs/module-usage": "^2.4.2",
"@goldfishjs/reactive": "^2.4.2",
"@goldfishjs/utils": "^2.4.2",
"mini-types": "^0.1.3"

@@ -22,0 +22,0 @@ },

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