Skip to content

Instantly share code, notes, and snippets.

Avatar
⚛️
design + code

Mike Skowronek coderitual

⚛️
design + code
View GitHub Profile
View Saga event source (channel)
function createSource(url) {
const source = fakeSource(url)
let deferred
source.onmessage = event => {
if(deferred) {
deferred.resolve(JSON.parse(event.data))
deferred = null
}