I am using revalidate as value returning from useSWR but I don't find it in the doc.
Also here there is an example of revalidate: https://github.com/zeit/swr/blob/master/examples/refetch-interval/pages/index.js
It could be useful adding that to the README
Revalidate is going to be deprecated, mutate does the same if you don't pass any argument.
I wonder why this decision was made at an API surface level ? Calling mutate() seems to me like a hidden gem that is hard to discover by somebody that doesn't know the library. Also, I believe that aliasing this call via revalidate is cheap to maintain.
What were your thoughts around it @sergiodxa @shuding ?
Most helpful comment
Revalidate is going to be deprecated, mutate does the same if you don't pass any argument.