Comments (6)
@didierfranc @runemadsen @bravomartin ^ here is a PR
from react-waterfall.
@runemadsen Could you utilise the shouldComponentUpdate lifecycle method to solve your issue?
from react-waterfall.
Yes, we are currently using shouldComponentUpdate
as a workaround. However:
-
We have hundreds of connected components that have to do deep equality checks every
100ms
. This is a significant performance hit that could be entirely eliminated with a singleif()
statement inreact-waterfall
that does not break the current API. -
I would argue that the current functionality is undesirable. In a component, I can easily fetch new data and only call
setState
if the data is different. This is currently impossible inreact-waterfall
, assetState
will be called on every action call, even ones that return nothing. This patterns prevents us from really embracing thestore
philosophy because we have no ability to perform heavy data fetching without also introducing heavy component logic.PureComponent
is no help sinceconnect()
creates a new object every time it is called, so the shallow equality check does not work.
I will happily send a PR if it's wanted.
from react-waterfall.
any interest on this?
It would solve my problem too :)
from react-waterfall.
@runemadsen A PR will be great and will solve a real issue ;)
from react-waterfall.
Excellent! That's exactly what I need.
Also very clean implementation 👍
@didierfranc please take a look and merge away 💯
from react-waterfall.
Related Issues (20)
- can not use Next.js getInitialProps() with react-waterfall connect(). HOT 2
- Unable to run tests
- Why was the reselect example removed? HOT 1
- Question: Middleware possibilites HOT 3
- Question: why is this clone of Redux better than Redux? HOT 1
- typescript type support HOT 13
- reset/clear state for SSR? HOT 5
- Whatever happened to getState? HOT 3
- v4 examples are broken because the actions argument is missing HOT 3
- Action not receiving value HOT 2
- Chaining actions and waiting for state updates? HOT 1
- Plans and roadmap? HOT 2
- The future of react-waterfall HOT 6
- Redux Dev Tools upgrade needed HOT 2
- Change state multiple times in an action HOT 4
- error when running react-waterfall-example https://github.com/didierfranc/react-waterfall-example/ HOT 1
- Uncaught TypeError: A class descriptor's .kind property must be "class", but a decorator created a class descriptor with .kind "undefined" HOT 1
- Router: Store returns to initialState on loading different page HOT 2
- Multiple Contexts supported? HOT 3
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-waterfall.