-
Notifications
You must be signed in to change notification settings - Fork 4.8k
-
What's the stateful logic of the useEventListener
in Mouse Tracker Example? It looks like a normal function.
Beta Was this translation helpful? Give feedback.
All reactions
Replies: 2 comments
-
In my opinion, Composables are usual normal functions. This example shows us how easy we can divide some code logic into small composables(functions) and reuse this logic into components or other composables.
Beta Was this translation helpful? Give feedback.
All reactions
-
I'd say it is because you are altering the target
object by adding/removing event listener to it.
But TBH, so far I am struggling to divide composables/utils properly in my main work project. It is fairly easy to mix them up during development and then quite hard to split them again...
Beta Was this translation helpful? Give feedback.