Replies: 5 comments 6 replies
-
Actually, I just realized I like the drier API of swr, but I think this would be a useful addition. |
Beta Was this translation helpful? Give feedback.
-
I realize unmounted |
Beta Was this translation helpful? Give feedback.
-
I am also looking forward to this feature, in my opinion, it would be better to have a FSM, indicate : [initial, loading, error] state ~ |
Beta Was this translation helpful? Give feedback.
-
It's a bit tricky to do this in the "React way", and some extra logic (reference counting) needs to be added to each SWR hook so it might bring some unneeded overhead for users that don't need it. I'll think about a better way, Middleware is probably doable. |
Beta Was this translation helpful? Give feedback.
-
@pke since there is no official impl for now, we could try it ourself like this SAMPLE ONLY
|
Beta Was this translation helpful? Give feedback.
-
Hello, I'd like to show a loading indicator whenever any swr request is in progress.
I came up with this solution:
I have some questions about it:
Beta Was this translation helpful? Give feedback.
All reactions