Comments (2)
You are very right, the terms are confusing. It's clearly an oversight from me.
The first thing that probably should be done would be to remove the confusion between "reload" and "refresh" as they mean essentially the same. However, if "autoRefreshing" was called "autoReloading", it would be misleading as there could still be automatic reloads based on other options (reload
or reinitialize
). Thus, I think autoRefreshing
should be simply renamed to polling
.
Let me try to make more sense out of the naming by virtually renaming some of the options and props:
options
original name | new name |
---|---|
autoRefreshInterval |
pollInterval |
props
original name | new name |
---|---|
isRefreshing |
isPolling |
refresh() |
reload() |
startAutoRefresh() |
startPolling() |
stopAutoRefresh() |
stopPolling() |
I can't figure out how the wrapped component could separate the two cases when looking at the props redux-autoloader is passing.
From the new prop names it might be more clear that the library doesn't currently keep state of how the loading (->isLoading
) was triggered. With this implementation it is not possible to know the source; whether it was because of polling, manual reload or a lifecycle reload.
Clearly the isRefreshing
is the most misleading here, as it should had originally been named as isAutoRefreshing
.
from redux-autoloader.
Great suggestion for the name changes imo!
However, the main reason I opened the ticket was that I needed (and I still need) a way to distinguish the different reasons for the loading. I have a view where I use polling to keep the data fresh but the data in the view could also change due to a user-invoked async operation, in which case I want to show a loader until the data is up-to-date again. Could you add support for that?
from redux-autoloader.
Related Issues (4)
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 redux-autoloader.