@webkrafters/react-observable-context 4.3.0 → 4.4.1

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
@@ -648,6 +648,14 @@ store.setState({
648
648
  <h1 id="changes">What's Changed?</h1>
649
649
 
650
650
  <table>
651
+ <thead><tr><th>v4.4.0</th></tr></thead>
652
+ <tbody>
653
+ <tr><td><b>1.</b></td><td>Returns <code>undefined</code> for selector map pointing at a non-existent state slice. <i>(Previously returned <code>null</code>)</i></td></tr>
654
+ </tbody>
655
+ <thead><tr><th>v4.3.0</th></tr></thead>
656
+ <tbody>
657
+ <tr><td><b>1.</b></td><td>Added <code>React.Ref</code> forwarding to <code>connect</code>ed hoc client components.</td></tr>
658
+ </tbody>
651
659
  <thead><tr><th>v4.1.0</th></tr></thead>
652
660
  <tbody>
653
661
  <tr><td><b>1.</b></td><td>Added new setState <a href="#setstate-tags">tags</a> to facilitate state update operations.</td></tr>
@@ -166,6 +166,9 @@ var Accessor = function () {
166
166
  return Accessor;
167
167
  }();
168
168
  function _setValueAt2(propertyPath, atom) {
169
+ if (!atom) {
170
+ return;
171
+ }
169
172
  !atom.isConnected(_classPrivateFieldGet(this, _id)) && atom.connect(_classPrivateFieldGet(this, _id));
170
173
  _classPrivateFieldGet(this, _value)[propertyPath] = atom.value;
171
174
  }
@@ -1,6 +1,6 @@
1
1
  export default Atom;
2
2
  declare class Atom<T> {
3
- constructor(value?: any);
3
+ constructor(value?: T | Readonly<T>);
4
4
  get value(): Readonly<T>;
5
5
  connect(accessorId: number): number;
6
6
  disconnect(accessorId: number): number;
@@ -21,7 +21,7 @@ var _connections = new WeakMap();
21
21
  var _value = new WeakMap();
22
22
  var Atom = function () {
23
23
  function Atom() {
24
- var value = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : null;
24
+ var value = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : undefined;
25
25
  _classCallCheck(this, Atom);
26
26
  _classPrivateFieldInitSpec(this, _connections, {
27
27
  writable: true,
package/package.json CHANGED
@@ -133,5 +133,5 @@
133
133
  "test:watch": "eslint --fix && jest --updateSnapshot --watchAll"
134
134
  },
135
135
  "types": "dist/main/index.d.ts",
136
- "version": "4.3.0"
136
+ "version": "4.4.1"
137
137
  }