@reactables/examples 0.4.0-alpha.2 → 0.4.1-alpha.0

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.
Files changed (2) hide show
  1. package/dist/index.js +5 -7
  2. package/package.json +2 -2
package/dist/index.js CHANGED
@@ -76,8 +76,8 @@ var RxTodoUpdates = function (updateTodoApi) {
76
76
  effects: function (payload) { return ({
77
77
  key: payload.todoId,
78
78
  effects: [
79
- function (actions$) {
80
- return actions$.pipe(
79
+ function (todoUpdates$) {
80
+ return todoUpdates$.pipe(
81
81
  // Call todo API Service - switchMap operator cancels previous pending call if a new one is initiated
82
82
  operators.switchMap(function (_a) {
83
83
  var payload = _a.payload;
@@ -134,9 +134,7 @@ var RxEventTickets = function (getPriceApi) {
134
134
  // Create reactable for combining controls and price info.
135
135
  var state$ = core.RxBuilder({
136
136
  // Add control changes as a source for second reactable
137
- sources: [
138
- rxControls.state$.pipe(operators.map(function (payload) { return ({ type: 'controlChange', payload: payload }); })),
139
- ],
137
+ sources: { controlChange: rxControls.state$ },
140
138
  initialState: initialState,
141
139
  reducers: {
142
140
  controlChange: {
@@ -147,8 +145,8 @@ var RxEventTickets = function (getPriceApi) {
147
145
  effects: function () { return ({
148
146
  // Add effect for fetching price on controlChange
149
147
  effects: [
150
- function (actions$) {
151
- return actions$.pipe(operators.switchMap(function (_a) {
148
+ function (controlChange$) {
149
+ return controlChange$.pipe(operators.switchMap(function (_a) {
152
150
  var _b = _a.payload, event = _b.selectedEvent, qty = _b.qty;
153
151
  return getPriceApi({ event: event, qty: qty });
154
152
  }),
package/package.json CHANGED
@@ -14,10 +14,10 @@
14
14
  "author": "David Lai",
15
15
  "license": "ISC",
16
16
  "dependencies": {
17
- "@reactables/core": "^0.4.0-alpha.2"
17
+ "@reactables/core": "^0.4.1-alpha.0"
18
18
  },
19
19
  "peerDependencies": {
20
20
  "rxjs": "^6.0.0 || ^7.0.0"
21
21
  },
22
- "version": "0.4.0-alpha.2"
22
+ "version": "0.4.1-alpha.0"
23
23
  }