Skip to content

Commit

Permalink
Tip: link to Mitt lib
Browse files Browse the repository at this point in the history
Signed-off-by: Nicolas Earnshaw <nearnshaw@decentraland.org>
  • Loading branch information
nearnshaw authored Jan 15, 2025
1 parent 10fd0bc commit c657396
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions content/creator/sdk7/architecture/subscribe-to-changes.md
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,8 @@ export function main() {
}
```

{{< hint warning >}}
**📔 Note**: Note that this approach will only subscribe to `onChange()` for entities that exist at the start of the scene, for example entities created via the UI of the [Creator Hub]({{< ref "/content/creator/scene-editor/about-editor.md" >}}).
Note that this approach will only subscribe to `onChange()` for entities that exist at the start of the scene, for example entities created via the UI of the [Creator Hub]({{< ref "/content/creator/scene-editor/about-editor.md" >}}).

{{< hint info >}}
**💡 Tip**: If you prefer to instead handle events that are not necessarily related to a component changing, we recommend importing the TypeScript library [Mitt](https://www.npmjs.com/package/mitt) into your scene. This library offers simple functions to emit and listen to events.
{{< /hint >}}

0 comments on commit c657396

Please sign in to comment.