Why the "fetch" verb and not something else? #16
tom-sherman
started this conversation in
General
Replies: 2 comments 2 replies
-
There's no objective reason. The only reason I went with "fetch" is that often the method will call the built-in You don't have to stick with the naming terminology though if you don't like it. import { createCache } from "suspense";
export const {
fetchAsync: readAsync,
fetchSuspense: readSuspense,
} = createCache({ ... }); |
Beta Was this translation helpful? Give feedback.
1 reply
-
The longer this thought sits with me, the longer I like "read" I think I'll rename |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
This is just a random question, but why does the cache use the "fetch" verb and not for example "load" or "read"?
I've seen the latter used before, but fetching feels like it should return a promise to me - in the case of
fetchSuspense
this is not the case ofc.readSuspense
andreadAsync
feel better to me, maybe I'm thinking about it wrong.Beta Was this translation helpful? Give feedback.
All reactions