Giter VIP home page Giter VIP logo

redux-autoloader's People

Contributors

dependabot[bot] avatar nygardk avatar omahlama avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

redux-autoloader's Issues

isLoading behavior

Given that loadOnInitialize is true, I would have expected the component to pass isLoading: true on mount until it's done loading.

Instead, goes from false, to true, to false again.

image

Can't tell whether `isLoading` is caused by auto-refresh or call to `refresh`

I can't figure out a way to implement the following use case with redux-autoloader:
There's a reduxAutoloader wrapped component with auto-refresh enabled and it's utilising the refresh prop. The wrapped component should render loading spinner when the data is being reloaded as result of refresh prop but should not render the spinner when the data is loading as result of auto-refresh interval.

I can't figure out how the wrapped component could separate the two cases when looking at the props redux-autoloader is passing.

I also think the terms refresh and auto-refresh are mixed in the documentation which causes confusion. For instance, I incorrectly thought isRefreshing means someone has called refresh and the data is now being refreshed because of that.

Feature: Add option to reload all data

Hi,

we rely heavily on redux-autoloader in our latest project to fetch all data necessary. We would like to implement a "Refresh" button for the user (because otherwise users tend to hit F5 when they see no such button).

However, since we have a lot of data, we have lots of data and they are parametrized by ids (thousands of api endpoint in total), we cannot simple call .refresh() per component. So we would like to have a .refreshAll() method somewhere.

We tried dispatching a reset/load action, but reducer/saga depends on getting the apiCall as payload, which we cannot pass when api calls are parametrized.

Is there a possibility this package might include an internal memory of all instances to expore a refreshAll method? Maybe like a second HOC to wrap the refresh button in.

RC-10 change in behaviour

Hello again,

we are currently using RC-9 in production and upon trying RC-11, we have found a regression bug. It might not really be a bug, since you said that RC-10:

fixed incorrect behavior when loader has been initialized and reloadOnMount=false

We have a following setup with reloadOnMount false because we have multiple independent components using the same loader:

{
reloadOnMount: false,
cacheExpiresIn: 15e3,
autoRefreshInterval: 60e3
}

When using the default of true, two component in the same loader triggered two identical network requests and a lot of other requests on component updates.

The change in RC-10 is that the apiCall is not triggered on first mount at all (I expected it would, because loadOnInitialize is still true), but it doesn't. It only triggers API for the first time after 60 seconds (the first refresh interval).

Is that expected or are we just using it wrong?

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.