diff --git a/examples/stopwatch/models/stopwatch.js b/examples/stopwatch/models/stopwatch.js index 9823df8..cb54071 100644 --- a/examples/stopwatch/models/stopwatch.js +++ b/examples/stopwatch/models/stopwatch.js @@ -1,4 +1,3 @@ -const xtend = require('xtend') const raf = require('raf') module.exports = { @@ -9,11 +8,11 @@ module.exports = { laps: [] }, reducers: { - start: (data, state) => xtend(state, { start: true, startTime: Date.now() - state.elapsed }), - stop: (data, state) => xtend(state, { start: false }), - update: (data, state) => xtend(state, { elapsed: data }), - reset: (data, state) => xtend(state, { startTime: Date.now(), elapsed: 0, laps: [] }), - add: (data, state) => xtend(state, { laps: state.laps.concat(data) }) + start: (data, state) => ({ start: true, startTime: Date.now() - state.elapsed }), + stop: (data, state) => ({ start: false }), + update: (data, state) => ({ elapsed: data }), + reset: (data, state) => ({ startTime: Date.now(), elapsed: 0, laps: [] }), + add: (data, state) => ({ laps: state.laps.concat(data) }) }, effects: { now: (data, state, send, done) => { diff --git a/examples/stopwatch/package.json b/examples/stopwatch/package.json index 91c6818..8011f0e 100644 --- a/examples/stopwatch/package.json +++ b/examples/stopwatch/package.json @@ -11,8 +11,7 @@ "license": "ISC", "dependencies": { "budo": "^8.3.0", - "raf": "^3.2.0", - "xtend": "^4.0.1" + "raf": "^3.2.0" }, "devDependencies": { "es2020": "^1.1.7"