GithubHelp home page GithubHelp logo

Comments (5)

rrousselGit avatar rrousselGit commented on May 30, 2024 1

It's a general programming term. The meaning is the same as in DI (Dependency Injection).
If a provider uses something, that something is a dependency of the provider, no matter how the object is used.

watch vs listen vs read does not matter in this discussion. In fact, Riverpod doesn't matter either.
Widgets have dependencies too for example. Say you call Theme.of in a widget, then your widget has a dependency on ThemeData.

from riverpod.

catalunha avatar catalunha commented on May 30, 2024

I've also found vague dependency stuff.
I would love to know how to use this feature.
I've been through some State Managers and because I respect Remi a lot, I'd like to stop at Riverpod and really understand how things work to develop good codes with Riverpod and be able to help other colleagues, like Remi does with us.

from riverpod.

woprandi avatar woprandi commented on May 30, 2024

@rrousselGit dependencies is a parameter when creating a new provider. And a lint rule always triggered in test (scoped_providers_should_specify_dependencies); It's reasonable to add explanation somewhere (at least in doc string)

from riverpod.

rrousselGit avatar rrousselGit commented on May 30, 2024

The IDE documentation covers this

https://pub.dev/documentation/riverpod_annotation/latest/riverpod_annotation/AutoDisposeFutureProviderFamily/dependencies.html
https://pub.dev/documentation/riverpod/latest/riverpod/AutoDisposeStateNotifierProviderFamily/dependencies.html

from riverpod.

catalunha avatar catalunha commented on May 30, 2024

Sorry.
I understand the theory.
But let's go.
There is a simple and clear example of using dependency.

from riverpod.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.