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

Add dependencies provider #87

Open
nataly87s opened this issue Jan 17, 2020 · 3 comments
Open

Add dependencies provider #87

nataly87s opened this issue Jan 17, 2020 · 3 comments

Comments

@nataly87s
Copy link
Contributor

Let's say we have a dynamic component that renders other dynamic components, and wants to add more dependencies for these components to use.
currently we can do it manually by passing a new client through the provider, but I thought we could make a DependenciesProvider

@eladav
Copy link
Contributor

eladav commented Jan 19, 2020

sounds very useful... great idea :)
I talked to @EladBezalel a bit on that and this can cause some weird issues... it should be a last resort kind of thing and not something to be used as a common practice. I'll look at the PR and see if there uncovered edge cases there.

@eladav
Copy link
Contributor

eladav commented Jan 19, 2020

Okay after I saw the change I'm calmer :)
In any case, as I wrote in the PR we'll try to challenge this solution to see that we're not creating weird edge cases here (host has old dep, component brings in newer version of same dep, another component is shown in two different contexts, how do we manage multiple versions of it etc.)

@nataly87s
Copy link
Contributor Author

nataly87s commented Jan 21, 2020

I solved the multi dep version by adding a dependency hash to the storage key, so that components downloaded for a specific set of dependencies will be stored separately.

as I mentioned, we can already override the context (by adding another DynamicoProvider), so having the same component with different dependencies is possible even without this PR

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

2 participants