Coder Social home page Coder Social logo

Comments (7)

rrousselGit avatar rrousselGit commented on July 20, 2024 1

There aren't many reasons.
I just found the code more readable when reading providers, but that's about it.

from riverpod.

rrousselGit avatar rrousselGit commented on July 20, 2024 1

Ah, this is referring to "if you used read instead of watch to filter rebuilds, don't do that and instead see [link]"

Is that a better wording?

from riverpod.

rrousselGit avatar rrousselGit commented on July 20, 2024 1

Done 😄

from riverpod.

madvib avatar madvib commented on July 20, 2024

Thanks for getting back with me. The docs do seem to suggest that this causes unwanted rebuilds.

It may cause less confusion to highlight passing a reference as the idiomatic way to go about instantiation rather than labeling all calls to read inside a provider as a bad practice.

from riverpod.

rrousselGit avatar rrousselGit commented on July 20, 2024

The docs do seem to suggest that this causes unwanted rebuilds.

What are you referring to? Because it doesn't

from riverpod.

madvib avatar madvib commented on July 20, 2024

DON'T call [read] inside the body of a provider

If you want to avoid unwanted rebuilds of your object, see My provider updates too often, what can I do?

That is at least how I interpret the above, sorry if I am missing something.

from riverpod.

madvib avatar madvib commented on July 20, 2024

OK I understand and yes that is much more clear. Just a nit but I think that concept would be much more clear either in it's own info message box or perhaps above the code block in that section. Happy to make a pr if that'd help

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.