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

@untool/react

Package Overview
Dependencies
Maintainers
5
Versions
98
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@untool/react - npm Package Compare versions

Comparing version 2.1.2 to 2.1.3

12

CHANGELOG.md

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

## [2.1.3](https://github.com/untool/untool/compare/v2.1.2...v2.1.3) (2020-02-24)
### Bug Fixes
* update dependency serialize-javascript to v3 ([1e0aadb](https://github.com/untool/untool/commit/1e0aadb51e90c95435ed3370af2e48d68fa3f121))
* **react:** set data-mounted attribute after hydration ([566a3a5](https://github.com/untool/untool/commit/566a3a55d631f89113acc7c5390123688310cda6))
## [2.1.2](https://github.com/untool/untool/compare/v2.1.1...v2.1.2) (2020-02-14)

@@ -8,0 +20,0 @@

21

mixins/mixin.browser.js

@@ -40,9 +40,2 @@ 'use strict';

render() {
const mountpoint = document.querySelector('[data-mountpoint]');
const isMounted = mountpoint.hasAttribute('data-mounted');
if (isMounted) {
unmountComponentAtNode(mountpoint);
} else {
mountpoint.setAttribute('data-mounted', '');
}
Promise.resolve()

@@ -52,5 +45,13 @@ .then(() => this.bootstrap())

.then((element) =>
this.fetchData({}, element).then(() =>
(isMounted ? render : hydrate)(element, mountpoint)
)
this.fetchData({}, element).then(() => {
const mountpoint = document.querySelector('[data-mountpoint]');
const isMounted = mountpoint.hasAttribute('data-mounted');
if (isMounted) {
unmountComponentAtNode(mountpoint);
render(element, mountpoint);
} else {
hydrate(element, mountpoint);
mountpoint.setAttribute('data-mounted', '');
}
})
);

@@ -57,0 +58,0 @@ }

{
"name": "@untool/react",
"version": "2.1.2",
"version": "2.1.3",
"description": "untool react mixin",

@@ -23,3 +23,3 @@ "browser": "lib/runtime.js",

"@babel/preset-react": "^7.7.0",
"@untool/core": "^2.1.2",
"@untool/core": "^2.1.3",
"babel-plugin-transform-react-remove-prop-types": "^0.4.24",

@@ -33,3 +33,3 @@ "clone": "^2.1.2",

"prop-types": "^15.7.2",
"serialize-javascript": "^2.1.1"
"serialize-javascript": "^3.0.0"
},

@@ -45,3 +45,3 @@ "peerDependencies": {

},
"gitHead": "b800fa0c666729df13ff7c1d81ada6ef3ecea12e"
"gitHead": "bc0e3a4bad765827fb018e6d920ddfb1fb865989"
}
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