New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@cerebral/fluent

Package Overview
Dependencies
Maintainers
5
Versions
73
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@cerebral/fluent - npm Package Compare versions

Comparing version 1.0.0-1518516413042 to 1.0.0-1518524980837

17

lib/View.js

@@ -1,3 +0,10 @@

import { autorun } from 'mobx';
import { Reaction } from 'mobx';
import { getChangedProps, throwError, isObject, noop } from 'cerebral/internal';
function autorun(view) {
const reaction = new Reaction(view.name || 'Autorun', function () {
this.track(view);
});
reaction.runReaction();
return reaction.getDisposer();
}
class View {

@@ -25,7 +32,9 @@ constructor({ dependencies, props, controller, displayName, onUpdate }) {

registerAutorun() {
console.log(this._displayName, 'starting autorun!');
this.autorun = autorun(() => {
console.log(this._displayName, 'autorun!');
this.cerebralProps = this.dependencies({
state: this.controller.state,
signals: this.controller.signals,
props: this.props,
props: this.props
});

@@ -38,2 +47,3 @@ if (this.isMounted) {

mount() {
console.log(this._displayName, 'MOUNTING!');
this.registerAutorun();

@@ -78,4 +88,3 @@ this.isMounted = true;

!this._hasWarnedBigComponent &&
Object.keys(dependenciesProps).length >=
this.controller.devtools.bigComponentsWarning) {
Object.keys(dependenciesProps).length >= this.controller.devtools.bigComponentsWarning) {
console.warn(`Component named ${this

@@ -82,0 +91,0 @@ ._displayName} has a lot of dependencies, consider refactoring or adjust this option in devtools`);

{
"name": "@cerebral/fluent",
"version": "1.0.0-1518516413042",
"version": "1.0.0-1518524980837",
"description": "Makes Cerebral typescript friendly",

@@ -27,3 +27,3 @@ "main": "index.js",

"dependencies": {
"cerebral": "^4.2.0-1518516413042",
"cerebral": "^4.2.0-1518524980837",
"mobx": "^3.4.1"

@@ -30,0 +30,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