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

@untool/react

Package Overview
Dependencies
Maintainers
6
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 0.7.0 to 0.8.0

8

CHANGELOG.md

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

<a name="0.8.0"></a>
# [0.8.0](https://github.com/untool/untool/compare/v0.7.0...v0.8.0) (2018-06-13)
**Note:** Version bump only for package @untool/react
<a name="0.7.0"></a>

@@ -8,0 +16,0 @@ # [0.7.0](https://github.com/untool/untool/compare/v0.4.0...v0.7.0) (2018-06-05)

2

lib/components.js

@@ -5,3 +5,3 @@ const { createElement } = require('react');

exports.withServer = function withServer(WrappedComponent) {
return withRouter(props =>
return withRouter((props) =>
createElement(WrappedComponent, {

@@ -8,0 +8,0 @@ ...props,

const esc = require('serialize-javascript');
const variable = ({ name, value }) => `<script>${name}=${esc(value)}</script>`;
const cssLink = css => `<link rel="stylesheet" href="/${css}" />`;
const jsLink = js => `<script src="/${js}"></script>`;
const cssLink = (css) => `<link rel="stylesheet" href="/${css}" />`;
const jsLink = (js) => `<script src="/${js}"></script>`;
module.exports = data =>
module.exports = (data) =>
`<!DOCTYPE html>

@@ -9,0 +9,0 @@ <html ${data.fragments.htmlAttributes}>

@@ -6,3 +6,6 @@ /* eslint-env browser */

const { override, async: { compose, parallel, pipe } } = require('mixinable');
const {
override,
async: { compose, parallel, pipe },
} = require('mixinable');

@@ -24,5 +27,6 @@ const { Mixin } = require('@untool/core');

render() {
var mountpoint = document.querySelector(`#${this.config.namespace}`);
var attribute = `data-${this.config.namespace}`;
var isMounted = mountpoint.hasAttribute(attribute);
const { name } = this.config;
const mountpoint = document.querySelector(`#${name}`);
const attribute = `data-${name}`;
const isMounted = mountpoint.hasAttribute(attribute);
if (isMounted) {

@@ -36,8 +40,8 @@ unmountComponentAtNode(mountpoint);

.then(() => this.enhanceElement(this.element))
.then(element =>
.then((element) =>
this.fetchData({}, element)
.then(data => this.enhanceData(data))
.then((data) => this.enhanceData(data))
.then(() => element)
)
.then(element => (isMounted ? render : hydrate)(element, mountpoint));
.then((element) => (isMounted ? render : hydrate)(element, mountpoint));
}

@@ -44,0 +48,0 @@ }

@@ -6,3 +6,6 @@ const { createElement } = require('react');

const { override, async: { compose, parallel, pipe } } = require('mixinable');
const {
override,
async: { compose, parallel, pipe },
} = require('mixinable');

@@ -38,3 +41,3 @@ const { Mixin } = require('@untool/core');

...data,
mountpoint: this.config.namespace,
mountpoint: this.config.name,
assetsByType: this.assetsByType,

@@ -55,6 +58,6 @@ globals: data.globals || [],

.then(() => this.enhanceElement(this.element))
.then(element =>
this.fetchData({}, element).then(data => ({ element, data }))
.then((element) =>
this.fetchData({}, element).then((data) => ({ element, data }))
)
.then(result => {
.then((result) => {
const { element, data } = result;

@@ -65,3 +68,3 @@ const markup = renderToString(element);

.then(template)
.then(document => {
.then((document) => {
const routerContext = this.routerContext;

@@ -68,0 +71,0 @@ if (routerContext.miss) {

{
"name": "@untool/react",
"version": "0.7.0",
"version": "0.8.0",
"description": "untool react mixin",

@@ -28,3 +28,3 @@ "keywords": [

"dependencies": {
"@untool/core": "^0.7.0",
"@untool/core": "^0.8.0",
"babel-plugin-transform-react-remove-prop-types": "^0.4.13",

@@ -31,0 +31,0 @@ "babel-preset-react": "^6.24.1",

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