question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[FeatureRequest] Add scope to components properties (constructor parameters)

See original GitHub issue

Hi 😃

When creating a component we can add properties, for now the properties that are created are always with public access modify. image

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

Thanks, have a great day 😄

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:6 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
PhaserEditor2Dcommented, May 3, 2021

Yes, as constructor parameters it has sense. But it just complicates things. Maybe in the future I will implement it.

0reactions
PhaserEditor2Dcommented, Aug 12, 2021

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).

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found