ywana-core8 0.0.839 → 0.0.840
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/dist/index.cjs +7 -0
- package/dist/index.cjs.map +1 -1
- package/dist/index.modern.js +7 -0
- package/dist/index.modern.js.map +1 -1
- package/dist/index.umd.js +7 -0
- package/dist/index.umd.js.map +1 -1
- package/package.json +1 -1
- package/src/incubator/task.js +6 -0
package/package.json
CHANGED
package/src/incubator/task.js
CHANGED
@@ -82,6 +82,11 @@ export const TaskContextProvider = (props) => {
|
|
82
82
|
setListeners(next)
|
83
83
|
}
|
84
84
|
|
85
|
+
function addListeners(newListeners) {
|
86
|
+
const next = { ...listeners, ...newListeners }
|
87
|
+
setListeners(next)
|
88
|
+
}
|
89
|
+
|
85
90
|
function removeListener(taskID) {
|
86
91
|
const next = { ...listeners }
|
87
92
|
delete next[taskID]
|
@@ -96,6 +101,7 @@ export const TaskContextProvider = (props) => {
|
|
96
101
|
removeTask,
|
97
102
|
listeners,
|
98
103
|
addListener,
|
104
|
+
addListeners,
|
99
105
|
removeListener
|
100
106
|
};
|
101
107
|
|