Parse string based staleTime values #1409
-
I often have to go to Google or some other service to quickly convert a duration (7 days, 1 hr, etc) to milliseconds for use with // Proposed
staleTime: '7d'
refetchInterval: '1hr' With a quick search I came across a library called Duration.js that appears to have the functionality I'm proposing. Of course including extra dependencies, especially only the 2nd one for the whole project isn't awesome. Maybe just build it in natively to the library as a very simplified version. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
I would much rather just find and vet a good utility to do this and merely suggest and document its potential usage. |
Beta Was this translation helpful? Give feedback.
I would much rather just find and vet a good utility to do this and merely suggest and document its potential usage.