Git Product home page Git Product logo

Comments (5)

nfcampos avatar nfcampos commented on May 14, 2024

also, just noticed that the api documentation mentions these two functions taking as an argument an iterable but the current implementations only allow for providing arrays, since they then call Array.prototype methods on it. A simple fix would be to add a line at the begging of each doing
iterable = Array.from(iterable)

from react-refetch.

ryanbrainard avatar ryanbrainard commented on May 14, 2024

I'm not completely opposed to it, but wanted these methods to mirror their Promise counterparts. It also provides nice symmetry with array spread syntax:

const [a, b] = PromiseState.all([aFetch, bFetch])

these two functions taking as an argument an iterable but the current implementations only allow for providing arrays

Good catch! That's what I get for copying the Promise API doc :)

from react-refetch.

ryanbrainard avatar ryanbrainard commented on May 14, 2024

Broke out the iterable bug in #79.

Going to mark this as "discussion" if other people have thoughts, but at this point, I'm slightly opposed to allowing separate parameters.

from react-refetch.

nfcampos avatar nfcampos commented on May 14, 2024

yes, the parity with Promise.all() is a good point, maybe it's not worth it

from react-refetch.

ryanbrainard avatar ryanbrainard commented on May 14, 2024

maybe it's not worth it

Closing this for now. Re-open if there's still a reason to do this.

from react-refetch.

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.