EYHN
3df51a217d
feat(core): add use guard hook ( #11180 )
...
Previously, we used `useLiveData(guardService.can$())` to get the guard result, but `guardService.can$()` will request the server to revalidate the permission when calling it, will cause additional network requests when re-render.
This pr make a new hook `useGuard` to fix this problem.
And the side effect in `can$` is moved to `revalidateCan()` to make that the subscribe method is pure
2025-03-25 14:15:29 +00:00
..
2025-03-09 05:44:26 +00:00
2025-03-20 12:46:15 +00:00
2025-02-13 02:36:05 +00:00
2025-03-25 09:51:48 +00:00
2025-01-22 22:52:31 +08:00
2025-03-19 02:40:06 +00:00
2025-03-25 08:47:27 +00:00
2024-12-23 04:54:00 +00:00
2025-03-18 08:13:58 +00:00
2025-03-20 12:46:15 +00:00
2025-03-20 03:52:56 +00:00
2025-03-10 02:04:01 +00:00
2025-03-20 01:33:29 +00:00
2025-02-11 13:26:43 +00:00
2025-03-20 13:47:35 +00:00
2024-12-23 04:54:00 +00:00
2025-03-21 05:09:19 +00:00
2025-03-20 05:46:56 +00:00
2025-03-24 06:12:47 +00:00
2025-03-25 14:15:29 +00:00
2025-01-14 02:10:34 +00:00
2025-03-24 12:55:00 +00:00
2025-01-27 07:58:16 +00:00
2025-03-10 02:04:01 +00:00
2024-12-23 04:54:00 +00:00
2025-03-13 10:59:50 +08:00
2025-03-10 02:04:01 +00:00
2025-03-20 23:20:59 +00:00
2025-03-05 09:28:51 +00:00
2024-12-23 04:54:00 +00:00
2025-03-20 12:46:15 +00:00
2025-03-10 02:04:01 +00:00
2025-03-14 09:32:10 +00:00
2025-03-05 00:13:08 +00:00
2024-12-23 04:54:00 +00:00
2025-03-20 12:46:15 +00:00
2025-03-25 14:15:29 +00:00
2025-03-25 14:15:29 +00:00
2025-03-14 18:05:54 +08:00
2025-03-06 13:10:18 +00:00
2025-03-20 00:34:12 +00:00
2025-03-06 13:10:18 +00:00
2025-03-25 14:15:29 +00:00
2025-03-06 13:10:18 +00:00
2025-02-05 07:57:03 +00:00
2024-08-22 04:24:44 +00:00
2025-03-12 11:29:24 +09:00
2024-12-23 04:54:00 +00:00
2025-03-06 02:05:29 +00:00
2024-12-23 04:54:00 +00:00
2024-12-23 04:54:00 +00:00
2024-10-29 13:55:13 +08:00
2025-03-25 08:15:23 +00:00
2025-03-20 12:46:15 +00:00
2025-03-14 18:05:54 +08:00
2025-03-25 08:15:23 +00:00
2025-03-20 12:46:15 +00:00