-
-
Notifications
You must be signed in to change notification settings - Fork 932
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: Add HasWorldReference
mixin
#2746
Conversation
doc/flame/components.md
Outdated
@@ -189,6 +189,28 @@ that they will appear in the children list in the same order as they were | |||
scheduled for addition. | |||
|
|||
|
|||
### Access to the World from a Component | |||
|
|||
When a component requires access to the `World` that it is attached to one can |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Unsure how to improve but the "that is attached to one" seems a bit confusing to me, maybe you meant when the user need to attach and have access to a world instance?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not sure why a separate mixin is needed for this. Wouldn't HasAncestor<MyWorld>
achieve the same result?
It would, but the world will be very used in the upcoming release and when you use |
Okay, in that case, should we call it |
Haha we actually discussed exactly that in the chat yesterday! It was previously called |
Description
Adds a mixin for components similar to
HasAncestor
,HasParent
andHasGameReference
but which provides access to theWorld
which the component has as an ancestor.Checklist
docs
and added dartdoc comments with///
.examples
ordocs
.Breaking Change?
Related Issues