Advertisement
Guest User

Untitled

a guest
Feb 25th, 2020
80
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. export function* waitForPairingSaga() {
  2.   const task = yield fork(connectionSaga);
  3.   while (true) {
  4.     const action = yield take(DEVICE_CHANGED);
  5.     console.log('waitForPairingSaga::', action);
  6.     if (action.payload.ownerId) {
  7.       task.cancel();
  8.       return action.payload.ownerId;
  9.     }
  10.   }
  11. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement