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

Component Injection should not create global variables #130

Open
alexanderoster opened this issue Jul 28, 2020 · 1 comment
Open

Component Injection should not create global variables #130

alexanderoster opened this issue Jul 28, 2020 · 1 comment

Comments

@alexanderoster
Copy link

Currently, component injection on the implementation side introduces static global variables - which are not a good idea in my opinion to introduce.

My suggestion would be, that we refactor component injection on the global level, and rather make it a feature of specific objects themselves. All classes that are created as return or out value of a method of an object would automatically "inherit" the injected component.

This would make a pattern very straight-forward, where people create a global context (like an "App" object) - and then use this as starting point for all further operations.

@alexanderoster
Copy link
Author

@martinweismann: I fear this is a breaking change though. Any ideas?

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

No branches or pull requests

1 participant