reactronic 0.22.103 → 0.22.104
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md
CHANGED
|
@@ -196,7 +196,7 @@ class Component<P> extends React.Component<P> {
|
|
|
196
196
|
@reaction // called immediately in response to changes
|
|
197
197
|
ensureUpToDate(): void {
|
|
198
198
|
if (this.shouldComponentUpdate())
|
|
199
|
-
|
|
199
|
+
Transaction.off(() => this.setState({})) // ask React to re-render
|
|
200
200
|
} // ensureUpToDate is subscribed to render
|
|
201
201
|
|
|
202
202
|
shouldComponentUpdate(): boolean {
|
|
@@ -310,7 +310,6 @@ function monitor(value: Monitor | null)
|
|
|
310
310
|
function trace(value: Partial<TraceOptions>)
|
|
311
311
|
|
|
312
312
|
function nonreactive<T>(func: F<T>, ...args: any[]): T
|
|
313
|
-
function nontransactional<T>(func: F<T>, ...args: any[]): T
|
|
314
313
|
function sensitive<T>(sensitivity: Sensitivity, func: F<T>, ...args: any[]): T
|
|
315
314
|
|
|
316
315
|
// Options, ObjectOptions, Kind, Reentrance, Monitor, TraceOptions, ProfilingOptions
|
|
@@ -18,7 +18,6 @@ export declare class Rx {
|
|
|
18
18
|
static setProfilingMode(enabled: boolean, options?: Partial<ProfilingOptions>): void;
|
|
19
19
|
}
|
|
20
20
|
export declare function nonreactive<T>(func: F<T>, ...args: any[]): T;
|
|
21
|
-
export declare function nontransactional<T>(func: F<T>, ...args: any[]): T;
|
|
22
21
|
export declare function sensitive<T>(sensitivity: boolean, func: F<T>, ...args: any[]): T;
|
|
23
22
|
export declare function unobservable(proto: object, prop: PropertyKey): any;
|
|
24
23
|
export declare function transaction(proto: object, prop: PropertyKey, pd: PropertyDescriptor): any;
|
package/build/dist/source/Rx.js
CHANGED
|
@@ -1,13 +1,12 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.options = exports.cached = exports.reaction = exports.transaction = exports.unobservable = exports.sensitive = exports.
|
|
3
|
+
exports.options = exports.cached = exports.reaction = exports.transaction = exports.unobservable = exports.sensitive = exports.nonreactive = exports.Rx = void 0;
|
|
4
4
|
const Dbg_1 = require("./util/Dbg");
|
|
5
5
|
const Options_1 = require("./Options");
|
|
6
6
|
const Data_1 = require("./impl/Data");
|
|
7
7
|
const Snapshot_1 = require("./impl/Snapshot");
|
|
8
8
|
const Hooks_1 = require("./impl/Hooks");
|
|
9
9
|
const Operation_1 = require("./impl/Operation");
|
|
10
|
-
const Transaction_1 = require("./impl/Transaction");
|
|
11
10
|
class Rx {
|
|
12
11
|
static why(brief = false) { return brief ? Operation_1.OperationController.briefWhy() : Operation_1.OperationController.why(); }
|
|
13
12
|
static getController(method) { return Operation_1.OperationController.of(method); }
|
|
@@ -29,10 +28,6 @@ function nonreactive(func, ...args) {
|
|
|
29
28
|
return Operation_1.OperationController.runWithin(undefined, func, ...args);
|
|
30
29
|
}
|
|
31
30
|
exports.nonreactive = nonreactive;
|
|
32
|
-
function nontransactional(func, ...args) {
|
|
33
|
-
return Transaction_1.Transaction.off(func, ...args);
|
|
34
|
-
}
|
|
35
|
-
exports.nontransactional = nontransactional;
|
|
36
31
|
function sensitive(sensitivity, func, ...args) {
|
|
37
32
|
return Hooks_1.Hooks.sensitive(sensitivity, func, ...args);
|
|
38
33
|
}
|
|
@@ -11,4 +11,4 @@ export { Snapshot } from './impl/Snapshot';
|
|
|
11
11
|
export { Transaction } from './impl/Transaction';
|
|
12
12
|
export { Monitor } from './impl/Monitor';
|
|
13
13
|
export { TransactionJournal } from './impl/TransactionJournal';
|
|
14
|
-
export { Rx, nonreactive,
|
|
14
|
+
export { Rx, nonreactive, sensitive, unobservable, transaction, reaction, cached, options } from './Rx';
|
package/build/dist/source/api.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.options = exports.cached = exports.reaction = exports.transaction = exports.unobservable = exports.sensitive = exports.
|
|
3
|
+
exports.options = exports.cached = exports.reaction = exports.transaction = exports.unobservable = exports.sensitive = exports.nonreactive = exports.Rx = exports.TransactionJournal = exports.Monitor = exports.Transaction = exports.Snapshot = exports.ObservableObject = exports.ToggleRef = exports.Ref = exports.Controller = exports.TraceLevel = exports.Reentrance = exports.Kind = exports.SealedSet = exports.SealedMap = exports.SealedArray = exports.pause = exports.all = void 0;
|
|
4
4
|
var Utils_1 = require("./util/Utils");
|
|
5
5
|
Object.defineProperty(exports, "all", { enumerable: true, get: function () { return Utils_1.all; } });
|
|
6
6
|
Object.defineProperty(exports, "pause", { enumerable: true, get: function () { return Utils_1.pause; } });
|
|
@@ -32,7 +32,6 @@ Object.defineProperty(exports, "TransactionJournal", { enumerable: true, get: fu
|
|
|
32
32
|
var Rx_1 = require("./Rx");
|
|
33
33
|
Object.defineProperty(exports, "Rx", { enumerable: true, get: function () { return Rx_1.Rx; } });
|
|
34
34
|
Object.defineProperty(exports, "nonreactive", { enumerable: true, get: function () { return Rx_1.nonreactive; } });
|
|
35
|
-
Object.defineProperty(exports, "nontransactional", { enumerable: true, get: function () { return Rx_1.nontransactional; } });
|
|
36
35
|
Object.defineProperty(exports, "sensitive", { enumerable: true, get: function () { return Rx_1.sensitive; } });
|
|
37
36
|
Object.defineProperty(exports, "unobservable", { enumerable: true, get: function () { return Rx_1.unobservable; } });
|
|
38
37
|
Object.defineProperty(exports, "transaction", { enumerable: true, get: function () { return Rx_1.transaction; } });
|