Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add refreshInterval option to identity requests #179

Open
ipanasenko opened this issue Jul 17, 2017 · 0 comments
Open

Add refreshInterval option to identity requests #179

ipanasenko opened this issue Jul 17, 2017 · 0 comments

Comments

@ipanasenko
Copy link
Contributor

Hi.

As I understand, there is no way to do this right now. Is it possible to add this feature?
I think it would give more flexibility, especially paired with #177

const fetchUser = id => fetch(`/users/${id}`);

connect(props => ({
  user: {
    value: () => fetchUser(props.match.params.id),
    refreshInterval: 60000
  }
}))(Profile);

In this example, function provided to value should be called every minute.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant