Comments (11)
type check then
, catch
, andThen
and andCatch
as well?
from react-refetch.
Yeah, make sure they are functions (or undefined
). Any reason not to?
from react-refetch.
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.
this would be a breaking change
We're incrementing to 1.0.0, so let's do as part of that
from react-refetch.
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.
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.
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.
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.
I've opened a PR for the pure
optimisation #94
from react-refetch.
I've made these changes regarding type checking individual mappings, etc. I'll open a PR soon. (edit: #96)
from react-refetch.
Closed by #96
from react-refetch.
Related Issues (20)
- Identity requests meta does not have component HOT 1
- Accessing the response body in case of reject HOT 2
- Posting data and having it return as a promise HOT 5
- impossible to update my props into react-refetch HOT 1
- Update Lifecycle Hooks for Future Async Rendering HOT 3
- skip/disable/remove fetch config conditionally HOT 4
- Doesn't support SSR HOT 5
- [idea] useRefetch HOT 5
- Refresh POST method request doesn' work HOT 1
- [Typescript] Type of "body" attribute must be string? and not object? on the Mapping interface
- Can you retry a failed request from within render? HOT 1
- Typings problem with PromiseStateMapping/FunctionMapping HOT 1
- Pass this.state.data to then(), catch(), andThen() and andCatch() functions for more powerful side effects HOT 2
- Override default behavior on failure of fetch with refreshInterval HOT 1
- Typescript types seem not to work properly HOT 9
- react 16.9, Warning: componentWillMount has been renamed, and is not recommended for use HOT 2
- Fetch rejected but reason empty HOT 2
- Example in README cannot be compiled in TypeScript HOT 1
- Is it possible to use a callback of a request? HOT 4
- Support for react@17 HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from react-refetch.