Skip to content

Commit a655737

Browse files
committed
prepare 2.2.0-nullsafety.2
1 parent c271f97 commit a655737

File tree

3 files changed

+29
-2
lines changed

3 files changed

+29
-2
lines changed

CHANGELOG.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,14 @@
1+
## 2.2.0-nullsafety.2 - Feb 9, 2021
2+
- Add `Selector`s: `select`, `select2`, ..., `select9` and `selectMany`.
3+
- Selectors can compute derived data, allowing Redux to store the minimal possible state.
4+
- Selectors are efficient. A selector is not recomputed unless one of its arguments changes.
5+
- When using the [select], [select2] to [select9], [selectMany] functions,
6+
keeps track of the latest arguments in which your selector function was invoked.
7+
Because selectors are pure functions, the last result can be returned
8+
when the arguments match without reinvoking your selector function.
9+
This can provide performance benefits, particularly with selectors that perform expensive computation.
10+
This practice is known as memoization.
11+
112
## 2.2.0-nullsafety.1 - Nov 30, 2020
213
- Fixed: support nullable action.
314

pubspec.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
name: rx_redux
22
description: Redux implementation based on Dart Stream, with the power of RxDart. Reactive redux store for Dart & Flutter.
3-
version: 2.2.0-nullsafety.1
3+
version: 2.2.0-nullsafety.2
44
author: Petrus Nguyen Thai Hoc <[email protected]>
55
homepage: https://github.com/hoc081098/rx_redux.git
66
repository: https://github.com/hoc081098/rx_redux.git

test/utils.dart

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,20 @@
1-
import 'package:quiver/core.dart';
1+
/// Generates a hash code for multiple [objects].
2+
int hashObjects(Iterable<int> objects) =>
3+
_finish(objects.fold(0, (h, i) => _combine(h, i.hashCode)));
4+
5+
// Jenkins hash functions
6+
7+
int _combine(int hash, int value) {
8+
hash = 0x1fffffff & (hash + value);
9+
hash = 0x1fffffff & (hash + ((0x0007ffff & hash) << 10));
10+
return hash ^ (hash >> 6);
11+
}
12+
13+
int _finish(int hash) {
14+
hash = 0x1fffffff & (hash + ((0x03ffffff & hash) << 3));
15+
hash = hash ^ (hash >> 11);
16+
return 0x1fffffff & (hash + ((0x00003fff & hash) << 15));
17+
}
218

319
/// Represents a 8-tuple.
420
class Tuple8<T1, T2, T3, T4, T5, T6, T7, T8> {

0 commit comments

Comments
 (0)