this.ipfs.id(async (err, info) => {
if (err) { throw err }
this.room = Room(this.ipfs, 'example')
this.room.broadcast(`{
'peer': 'Admin',
'message': 'Welcome'
}`), 2000)
}))
}
How can I access room.broadcast function outside its scope?
I want to pass it to a component which will run it on onClick
You can just pass the room object
Обсуждают сегодня