Proposal: remove created
event
#48
rigor789
started this conversation in
1. Ideas & Discussions
Replies: 1 comment
-
I say remove it. When reimplementing events from the ground up in |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Core currently emits a
created
event in the ViewBase constructor, however this is not used within core, and using it in user code is not all that useful either because it's emitted before you get a chance to add a listener, so essentially you can't directly listen to thecreated
event on a view. The only way to listen to it is through global listeners, ie.:Since this fires in the constructor, you don't have access to the view
id
, only the_domId
.https://github.com/NativeScript/NativeScript/blob/8d25d251cd1c311d3f73e526bf2fd4ee0b2be0b8/packages/core/ui/core/view-base/index.ts#L472
Proposal: remove this event from core, it seems useless and only adds a slight overhead to all view creation.
If you know a valid use-case for why we should keep this, please comment here!
/cc @NativeScript/tsc
Beta Was this translation helpful? Give feedback.
All reactions