[FeatureRequest] Add scope to components properties (constructor parameters)
See original GitHub issueHi 😃
When creating a component we can add properties, for now the properties that are created are always with public access modify.

Is it possible to add the scope option like when creating objects in the scenes?

Thanks, have a great day 😄
Issue Analytics
- State:
- Created 2 years ago
- Comments:6 (4 by maintainers)
Top Results From Across the Web
Allow `this` in constructor parameter · Issue #38038 - GitHub
Suggestion. Currently, this code fails with A 'this' type is available only in a non-static member of a class or interface.ts ...
Read more >Documentation - Classes - TypeScript
Constructors. Background Reading: Constructor (MDN). Class constructors are very similar to functions. You can add parameters with type annotations, ...
Read more >Contexts and Dependency Injection - Quarkus
The quarkus.arc.exclude-types property accepts a list of string values that are used to match classes that should be excluded. Table 1.
Read more >ASP.NET Core Blazor dependency injection - Microsoft Learn
IDataAccess is injected into the component's property DataRepository . ... In Blazor Server apps, the request scope lasts for the duration ...
Read more >Core Features - Spring
The constructor arguments passed to SpringApplication are configuration sources for Spring beans. In most cases, these are references to @Configuration ...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found

Yes, as constructor parameters it has sense. But it just complicates things. Maybe in the future I will implement it.
Thinking about this issue again. That’s no possible to use constructor parameters in components when are part of a prefab. The thing is, that if a prefab has a component with a constructor parameter, then you cannot change that parameter in the prefab instance.
So, we will have two different classes of parameters and it will make the whole thing more complicated. Encapsulation is good but in this case not required (I think).