-
Notifications
You must be signed in to change notification settings - Fork 10
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
Declare DependencyKeys namespace #5
base: main
Are you sure you want to change the base?
Conversation
Thanks for the PR @maximkrouk! I'm a little wary about the additional complexity The extension to the Furthermore, the current version of README is a little outdated, especially regarding the latest |
Well, keeping keys private feels reasonable. Keeping |
- reverted README.md - implemented more complex schedulers management in example - did some refactoring - indentation - type inference - moved comments to a higher code level to keep declarations smaller
Thanks @maximkrouk! |
Fine 🙂. Also, +1 for the global environment should be pretty convenient feature for UIKit I guess it might be easily implemented using my second PR, each root environment could use shared ComposableDependencies object (which could be accessible using trough GlobalEnvironment object)) Afaiu now it works in a similar way, if you create some environment (without anything in it's body) you can access all of the ComposableDependencies. Am I right? Or there is some different concept? |
@maximkrouk I've pushed the It defines a The I'll elaborate on the documentation in the upcoming days. |
I'm not sure that it's really crucial, but I liked the option to override dependencies in the ComposableEnvrionment, afaiu it's not possible in GlobalEnvrionment due to direct access to |
Oh, I see you pushed DependencyAliases, that fixes my concern from the prev reply, I guess |
Then you can still use |
I think so too. It is still recommended to use some top-level definitions, but if it's not possible, you can stitch the pieces and let the library synchronize the values. This will need real-life testing though. |
I'll soon push |
I find it pretty convenient to declare dependency keys in a namespace. I can implement it in my higher-level package (tca-extensions), but I guess that tca-env is a more appropriate place for this thing 🙂.