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 dependency injection doc #3501

Open
snapsl opened this issue Apr 24, 2024 · 2 comments
Open

Add dependency injection doc #3501

snapsl opened this issue Apr 24, 2024 · 2 comments
Assignees
Labels
documentation Improvements or additions to documentation question Further information is requested

Comments

@snapsl
Copy link

snapsl commented Apr 24, 2024

Make riverpod onboarding easier.

A great feature of riverpod is that we can easily implement dependency injection. But this is not described in the documentation.

The documentation should contain:

How-To implement dependency injection using riverpod:

  • provider (singleton)
  • ProviderScope override
  • family (I am not sure if that is desired)
  • testing

If needed, I can contribute to the docs.

@snapsl snapsl added documentation Improvements or additions to documentation needs triage labels Apr 24, 2024
@rrousselGit
Copy link
Owner

Can you be more specific about what you want here? Riverpod is not a DI package. And there are already docs explaining how to define a provider, override it, and test it.

@rrousselGit rrousselGit added question Further information is requested and removed needs triage labels Apr 24, 2024
@snapsl
Copy link
Author

snapsl commented Apr 24, 2024

Of course, using riverpod for DI is just a part of it link.
And eventually we use the same concepts (provider, override, testing) that are already defined in the documentation.

I thought about creating an exemplary use case maybe a "case study" that shows how to implement it. Dependency injection is such a frequently applied pattern. Why not promote how easy it is to implement using riverpod?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants