(state, prevState)
| 453 | |
| 454 | // Perform side effects on state changes |
| 455 | function handleStateChange(state, prevState) { |
| 456 | const canPlaySound = canPlaySoundSelector(state); |
| 457 | const canPlaySoundPrev = canPlaySoundSelector(prevState); |
| 458 | |
| 459 | if (canPlaySound !== canPlaySoundPrev) { |
| 460 | if (canPlaySound) { |
| 461 | soundManager.resumeAll(); |
| 462 | } else { |
| 463 | soundManager.pauseAll(); |
| 464 | } |
| 465 | } |
| 466 | } |
| 467 | |
| 468 | store.subscribe(handleStateChange); |
| 469 |
nothing calls this directly
no test coverage detected