react-refetch
react-refetch copied to clipboard
Add refreshInterval option to identity requests
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 https://github.com/heroku/react-refetch/issues/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.