Skip to content
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

Remove redundant properties from Best Practices/Components #342

Merged
merged 1 commit into from
Jun 7, 2024

Conversation

alexasterisk
Copy link
Contributor

Remove redundant property Scope from methods called from the inner scope.
The Message and Button do not request Scope in their properties, and since scope was overwrote with the inner scope, these are passing the same thing. The inner scope is already being passed in the object orientation.

This functions fine.

scope = scope:innerScope({ ...inner })
scope.Button(scope, { ...props })

This is what it currently is, which doesn't work as Button does not have a field called Scope.

scope = scope:innerScope({ ...inner })
scope.Button(scope, { Scope = scope, ...props })

Remove redundant property `Scope` from methods called from the inner scope.
@alexasterisk
Copy link
Contributor Author

alexasterisk commented Jun 4, 2024

I'm starting to think I'm wrong here? Looks like I've not messed around with v3 enough. I did not notice New returns a function instead of the Instance type anymore.

Or maybe it's because I was dumb and literally only looking at the New return type, even though yes, it's return function is where properties are provided. Which then that function returns the Instance type.

@dphfox dphfox merged commit d055b86 into dphfox:main Jun 7, 2024
@alexasterisk alexasterisk deleted the patch-1 branch June 7, 2024 20:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants