Git Product home page Git Product logo

Comments (11)

nfcampos avatar nfcampos commented on May 15, 2024

type check then, catch, andThen and andCatch as well?

from react-refetch.

ryanbrainard avatar ryanbrainard commented on May 15, 2024

Yeah, make sure they are functions (or undefined). Any reason not to?

from react-refetch.

nfcampos avatar nfcampos commented on May 15, 2024

since currently we ignore any values for these 4 that are not functions this would be a breaking change (as in it might break someone's app). But i still think we should do it

from react-refetch.

ryanbrainard avatar ryanbrainard commented on May 15, 2024

this would be a breaking change

We're incrementing to 1.0.0, so let's do as part of that

from react-refetch.

nfcampos avatar nfcampos commented on May 15, 2024

also, how do you feel about moving the type check definitions to a separate file, connect.js is getting kind of crowded, and it's not like you need to see the type checks to understand the rest of the code?

from react-refetch.

ryanbrainard avatar ryanbrainard commented on May 15, 2024

how do you feel about moving the type check definitions to a separate file

+1. We should probably go through and do some overall housekeeping.

from react-refetch.

nfcampos avatar nfcampos commented on May 15, 2024

btw, something i've been meaning to do is add a pure option like react-redux has (only recompute the mappings when props (or context) actually changed (compared with shallowEqual), also only rerender when same thing is true). Any reason why you didn't bring that over when you forked from react-redux?
(I remembered this now because with the defaults assignment, now we add type checking for each mapping, etc it probably gets kind of expensive when you have lots of mappings...)

from react-refetch.

ryanbrainard avatar ryanbrainard commented on May 15, 2024

pure option like react-redux. .. Any reason why you didn't bring that over when you forked

I think I left it out for immediate simplicity with the intention of adding it back, but never did.

from react-refetch.

nfcampos avatar nfcampos commented on May 15, 2024

I've opened a PR for the pure optimisation #94

from react-refetch.

nfcampos avatar nfcampos commented on May 15, 2024

I've made these changes regarding type checking individual mappings, etc. I'll open a PR soon. (edit: #96)

from react-refetch.

ryanbrainard avatar ryanbrainard commented on May 15, 2024

Closed by #96

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.