Skip to content

Commit

Permalink
update: readme.md
Browse files Browse the repository at this point in the history
  • Loading branch information
weixiangmeng521 committed Dec 20, 2023
1 parent a4daa25 commit 92181e4
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ const teleport = new Teleport();
teleport.emit('eventName', "hello world!");

teleport.receive('eventName', (data) => {
console.log('Event data:', data); // ✅ hello world!
console.log('Event data:', data); //Event data: hello world!
});
```

Expand All @@ -54,7 +54,7 @@ teleport.emit('eventName', "hello world!");
// Although it is delayed by 1000ms, the data can still be obtained
setTimeout(() => {
teleport.receive('eventName', (data) => {
console.log('Event data:', data); // ✅ hello world!
console.log('Event data:', data); //Event data: hello world!
});
}, 1000);
```
Expand Down

0 comments on commit 92181e4

Please sign in to comment.