283 Commits

Author SHA1 Message Date
Julien Valverdé 53fc1ef505 Fix
Lint / lint (push) Successful in 13s
2025-05-05 20:38:39 +02:00
Julien Valverdé c8b675d93e Fix
Lint / lint (push) Successful in 14s
2025-05-05 03:33:50 +02:00
Julien Valverdé 882ec9591c Fix
Lint / lint (push) Successful in 14s
2025-05-05 03:09:17 +02:00
Julien Valverdé 5b3637afd8 useSubscribeStream work
Lint / lint (push) Successful in 13s
2025-05-05 02:39:12 +02:00
Julien Valverdé d6256a7cfd Stream hooks work
Lint / lint (push) Successful in 14s
2025-05-04 01:18:29 +02:00
Julien Valverdé cf6c84ff8e useScope fix
Lint / lint (push) Successful in 14s
2025-05-02 21:56:46 +02:00
Julien Valverdé 198a7cee03 Fix
Lint / lint (push) Successful in 13s
2025-05-01 21:59:51 +02:00
Julien Valverdé 032f283ac8 Pull example
Lint / lint (push) Successful in 13s
2025-05-01 21:56:58 +02:00
Julien Valverdé c34629e20d usePullStream
Lint / lint (push) Successful in 13s
2025-05-01 21:08:52 +02:00
Julien Valverdé 284a080f19 usePullStream
Lint / lint (push) Successful in 13s
2025-05-01 20:27:11 +02:00
Julien Valverdé 87d27dd48d useScope work
Lint / lint (push) Successful in 13s
2025-05-01 19:18:54 +02:00
Julien Valverdé 24853561f1 Working useScope
Lint / lint (push) Successful in 15s
2025-05-01 17:10:45 +02:00
Julien Valverdé 1902ad373f useScope tests
Lint / lint (push) Successful in 18s
2025-05-01 16:48:37 +02:00
Julien Valverdé aa6c4a8008 Fix
Lint / lint (push) Successful in 13s
2025-05-01 16:19:42 +02:00
Julien Valverdé d5ac84b2cc Fix
Lint / lint (push) Successful in 14s
2025-05-01 16:17:01 +02:00
Julien Valverdé 3c604abcef useScope
Lint / lint (push) Failing after 11s
2025-05-01 03:01:18 +02:00
Julien Valverdé ba99309877 useSubscribePullStream
Lint / lint (push) Failing after 12s
2025-04-30 23:41:03 +02:00
Julien Valverdé db3cd05851 Fix
Lint / lint (push) Successful in 14s
2025-04-30 23:00:37 +02:00
Julien Valverdé dce81be269 Fix
Lint / lint (push) Successful in 17s
2025-04-30 22:52:38 +02:00
Julien Valverdé 3980c10747 Fix
Lint / lint (push) Successful in 16s
2025-04-30 21:41:58 +02:00
Julien Valverdé 43a3793dbf Fix
Lint / lint (push) Successful in 14s
2025-04-30 16:27:08 +02:00
Julien Valverdé da7044ee9f useRefFromValue
Lint / lint (push) Successful in 13s
2025-04-30 13:33:21 +02:00
Julien Valverdé ff5503cfd1 Fix
Lint / lint (push) Successful in 15s
2025-04-29 19:47:09 +02:00
Julien Valverdé dc2cfb35e0 Merge branch 'next' of git.valverde.cloud:Thilawyn/reffuse into next
Lint / lint (push) Successful in 13s
2025-04-27 19:13:26 +02:00
Julien Valverdé 1228c51694 Dependencies upgrade
Lint / lint (push) Successful in 13s
Test build / test-build (pull_request) Successful in 43s
2025-04-27 19:09:30 +02:00
Julien Valverdé 076007ec67 Refactoring
Lint / lint (push) Successful in 13s
2025-04-27 18:52:08 +02:00
Julien Valverdé dd524e1aa5 Refactoring
Lint / lint (push) Successful in 14s
2025-04-27 18:46:33 +02:00
Julien Valverdé 1c7cef703b SubRef
Lint / lint (push) Successful in 17s
2025-04-25 13:50:54 +02:00
Julien Valverdé fa0f8c6b24 Refactoring
Lint / lint (push) Successful in 14s
2025-04-25 13:38:42 +02:00
Julien Valverdé 357e5aa56b useSubRef
Lint / lint (push) Successful in 13s
2025-04-25 10:16:04 +02:00
Julien Valverdé ea374d7e0f Fix
Lint / lint (push) Successful in 13s
2025-04-25 08:32:42 +02:00
Julien Valverdé 148c98acbd Fix
Lint / lint (push) Successful in 13s
2025-04-25 08:30:17 +02:00
Julien Valverdé 39d2176c61 Working subref from path
Lint / lint (push) Successful in 13s
2025-04-25 08:21:59 +02:00
Julien Valverdé 107ff1e794 SubscriptionSubRef.makeFromPath
Lint / lint (push) Successful in 14s
2025-04-25 08:12:34 +02:00
Julien Valverdé a70ef27f75 PropertyPath done
Lint / lint (push) Successful in 14s
2025-04-25 07:56:56 +02:00
Julien Valverdé 04b2fad038 PropertyPath
Lint / lint (push) Successful in 29s
2025-04-25 07:40:21 +02:00
Julien Valverdé 691b28427d SearchPaths work
Lint / lint (push) Successful in 14s
2025-04-24 00:52:18 +02:00
Julien Valverdé 1de976aaa8 Fix
Lint / lint (push) Successful in 14s
2025-04-24 00:20:30 +02:00
Julien Valverdé df851cf9ee SearchPaths work
Lint / lint (push) Successful in 13s
2025-04-23 07:06:32 +02:00
Julien Valverdé 459f548c10 Fix
Lint / lint (push) Successful in 14s
2025-04-23 06:50:17 +02:00
Julien Valverdé 6156baec4d SearchPaths work
Lint / lint (push) Successful in 14s
2025-04-23 06:47:11 +02:00
Julien Valverdé 1163b83929 SearchPaths work
Lint / lint (push) Failing after 13s
2025-04-23 05:53:19 +02:00
Julien Valverdé 8917f84952 SearchPaths work
Lint / lint (push) Successful in 14s
2025-04-22 22:59:50 +02:00
Julien Valverdé 58752253b3 SearchPaths work
Lint / lint (push) Successful in 14s
2025-04-22 22:36:17 +02:00
Julien Valverdé ba362baf04 SearchPaths work
Lint / lint (push) Successful in 15s
2025-04-22 21:55:59 +02:00
Julien Valverdé 33cf4fbcbd Tests
Lint / lint (push) Successful in 14s
2025-04-21 05:15:55 +02:00
Julien Valverdé e8f92c88b8 Fix
Lint / lint (push) Successful in 13s
2025-04-21 03:17:41 +02:00
Julien Valverdé 6ae155de34 Version bump
Lint / lint (push) Successful in 13s
2025-04-21 02:53:31 +02:00
Julien Valverdé db783f174e Fix
Lint / lint (push) Successful in 13s
2025-04-21 02:52:50 +02:00
Julien Valverdé 2b48695e54 Merge branch 'next' of git.valverde.cloud:Thilawyn/reffuse into next
Lint / lint (push) Successful in 12s
2025-04-21 02:12:13 +02:00
Julien Valverdé ab441fe982 Fix
Lint / lint (push) Successful in 13s
Test build / test-build (pull_request) Successful in 44s
2025-04-21 02:01:24 +02:00
Julien Valverdé eabcf9085b useSubRefFromGetSet
Lint / lint (push) Successful in 14s
2025-04-21 01:21:59 +02:00
Julien Valverdé 926482b154 Fix
Lint / lint (push) Successful in 14s
2025-04-20 19:38:18 +02:00
Julien Valverdé 110b0813f8 Refactoring
Lint / lint (push) Successful in 29s
2025-04-20 06:14:58 +02:00
Julien Valverdé 974af95a22 Version bump
Lint / lint (push) Successful in 14s
2025-04-20 05:32:19 +02:00
Julien Valverdé d6e1d445e8 Fix
Lint / lint (push) Successful in 14s
2025-04-20 05:28:44 +02:00
Julien Valverdé d8d6e87a12 Refactoring
Lint / lint (push) Failing after 13s
2025-04-20 05:26:31 +02:00
Julien Valverdé 682e473bf7 Fix
Lint / lint (push) Successful in 13s
2025-04-20 05:10:51 +02:00
Julien Valverdé 31dd7b5fdb Working SubscriptionSubRef
Lint / lint (push) Successful in 13s
2025-04-20 05:06:48 +02:00
Julien Valverdé 17686e68c3 SubscriptionSubRef
Lint / lint (push) Successful in 18s
2025-04-20 04:34:01 +02:00
Julien Valverdé 49d4bd4d43 SubscriptionSubRef work
Lint / lint (push) Successful in 14s
2025-04-20 00:22:24 +02:00
Julien Valverdé be88035936 SubscriptionSubRef
Lint / lint (push) Failing after 10s
2025-04-19 03:42:48 +02:00
Julien Valverdé 3497d17046 Merge branch 'next' of git.valverde.cloud:Thilawyn/reffuse into next
Lint / lint (push) Successful in 13s
2025-04-14 00:58:05 +02:00
Julien Valverdé 1ca832e69d Fix
Lint / lint (push) Successful in 14s
Test build / test-build (pull_request) Successful in 21s
2025-04-14 00:54:06 +02:00
Julien Valverdé 98bd72d1d7 Cleanup
Lint / lint (push) Successful in 13s
2025-04-13 18:29:00 +02:00
Julien Valverdé f594f47793 VQueryErrorHandler
Lint / lint (push) Successful in 13s
2025-04-13 17:39:54 +02:00
Julien Valverdé 4f9827720c Fix
Lint / lint (push) Successful in 14s
2025-04-13 17:18:06 +02:00
Julien Valverdé 0f761524fd Fix
Lint / lint (push) Successful in 14s
2025-04-13 17:06:20 +02:00
Julien Valverdé 574136e161 SubscribeStream
Lint / lint (push) Successful in 14s
2025-04-13 03:21:11 +02:00
Julien Valverdé 7a12abdbdf useSubscribeStream
Lint / lint (push) Successful in 13s
2025-04-13 02:30:29 +02:00
Julien Valverdé 8fecb94292 Merge branch 'next' of git.valverde.cloud:Thilawyn/reffuse into next
Lint / lint (push) Successful in 13s
2025-04-12 23:59:40 +02:00
Julien Valverdé 26a2111705 Version bump
Lint / lint (push) Successful in 14s
Test build / test-build (pull_request) Successful in 43s
2025-04-12 23:52:35 +02:00
Julien Valverdé 1cb02407c8 Dependencies fix
Lint / lint (push) Successful in 14s
2025-04-12 23:47:43 +02:00
Julien Valverdé 6e8ce84851 Cleanup
Lint / lint (push) Successful in 13s
2025-04-12 23:06:43 +02:00
Julien Valverdé 570fb93876 ReffuseHelpers -> ReffuseNamespace
Lint / lint (push) Successful in 14s
2025-04-12 23:03:17 +02:00
Julien Valverdé 821fd18f8f Fix
Lint / lint (push) Successful in 14s
2025-04-12 18:30:37 +02:00
Julien Valverdé b7ef95341b Tests
Lint / lint (push) Successful in 14s
2025-04-12 00:39:02 +02:00
Julien Valverdé 5f5ef5614b Working SubscribeRefs
Lint / lint (push) Successful in 14s
2025-04-12 00:16:04 +02:00
Julien Valverdé cbd39f893e Done useSubscribeRefs
Lint / lint (push) Successful in 16s
2025-04-11 23:40:06 +02:00
Julien Valverdé 529e3d3f9d useSubscribeRefs work
Lint / lint (push) Failing after 10s
2025-04-11 21:43:32 +02:00
Julien Valverdé 9d47418a69 useRefsState work
Lint / lint (push) Failing after 10s
2025-04-11 20:10:34 +02:00
Julien Valverdé c1b6e73231 useRefsState work
Lint / lint (push) Successful in 13s
2025-04-11 02:58:44 +02:00
Julien Valverdé d1ba4148f2 useRefsState work
Lint / lint (push) Failing after 11s
2025-04-11 02:10:21 +02:00
Julien Valverdé ef13e87d12 Fix
Lint / lint (push) Successful in 14s
2025-04-11 00:23:15 +02:00
Julien Valverdé 8b141b907f RefState tests
Lint / lint (push) Successful in 14s
2025-04-10 23:06:13 +02:00
Julien Valverdé 52a36cb882 RefState component
Lint / lint (push) Successful in 58s
2025-04-10 22:38:29 +02:00
Julien Valverdé 3b844f071b Merge branch 'next' of git.valverde.cloud:Thilawyn/reffuse into next
Lint / lint (push) Successful in 12s
2025-03-31 21:43:29 +02:00
Julien Valverdé 4e422a1901 Version bump
Lint / lint (push) Successful in 13s
Test build / test-build (pull_request) Successful in 17s
2025-03-31 21:40:55 +02:00
Julien Valverdé a5c6b34dfe Example fix
Lint / lint (push) Successful in 14s
2025-03-31 21:19:41 +02:00
Julien Valverdé ab1f851428 Refactoring
Lint / lint (push) Successful in 14s
2025-03-31 21:07:42 +02:00
Julien Valverdé 3f091d55c2 QueryClient refactoring
Lint / lint (push) Successful in 17s
2025-03-31 20:54:32 +02:00
Julien Valverdé 76a33fccca Query refactoring
Lint / lint (push) Successful in 14s
2025-03-31 20:38:21 +02:00
Julien Valverdé c75bb10e6b QueryClient work
Lint / lint (push) Failing after 17s
2025-03-31 18:22:18 +02:00
Julien Valverdé 3da4b2a318 QueryClient work
Lint / lint (push) Failing after 14s
2025-03-31 01:54:08 +02:00
Julien Valverdé 9a24ecaf84 QueryClient work
Lint / lint (push) Failing after 14s
2025-03-31 00:00:47 +02:00
Julien Valverdé 7b20df6c71 Merge branch 'next' of git.valverde.cloud:Thilawyn/reffuse into next
Lint / lint (push) Successful in 12s
2025-03-28 21:26:06 +01:00
Julien Valverdé f40dae90fb Version bump
Lint / lint (push) Successful in 13s
Test build / test-build (pull_request) Successful in 44s
2025-03-28 21:22:32 +01:00
Julien Valverdé 46211638f5 Refactoring
Lint / lint (push) Successful in 13s
2025-03-28 21:19:17 +01:00
Julien Valverdé a28d6c3d30 Refactoring
Lint / lint (push) Successful in 13s
2025-03-28 21:12:42 +01:00
Julien Valverdé 6b74b9a3b2 useMemoScoped refactoring
Lint / lint (push) Successful in 13s
2025-03-28 21:09:27 +01:00
Julien Valverdé e17f945666 Fix
Lint / lint (push) Successful in 13s
2025-03-28 20:30:31 +01:00
Julien Valverdé aa46ecc82d Async provider refactoring
Lint / lint (push) Successful in 14s
2025-03-28 20:27:25 +01:00
Julien Valverdé 8ea9146dd9 Provider refactoring
Lint / lint (push) Successful in 13s
2025-03-28 19:18:46 +01:00
Julien Valverdé 0a4bb2856d Provider refactoring
Lint / lint (push) Successful in 13s
2025-03-28 18:48:49 +01:00
Julien Valverdé b4cd7daa81 Restore
Lint / lint (push) Failing after 26s
2025-03-28 18:26:04 +01:00
Julien Valverdé b5712d5433 Test
Lint / lint (push) Successful in 36s
2025-03-28 17:39:23 +01:00
Julien Valverdé 57b7eac05c Test 2025-03-28 17:37:28 +01:00
Julien Valverdé 9a9bd78ec6 Provider work
Lint / lint (push) Failing after 10s
2025-03-28 17:01:41 +01:00
Julien Valverdé ddcd681ca4 Provider refactoring
Lint / lint (push) Failing after 19m51s
2025-03-28 16:08:04 +01:00
Julien Valverdé 66de517ab5 Refactoring
Lint / lint (push) Failing after 15m36s
2025-03-26 20:24:53 +01:00
Julien Valverdé b50255ded2 Merge branch 'queryclient' of git.valverde.cloud:Thilawyn/reffuse into queryclient
Lint / lint (push) Successful in 13s
2025-03-26 19:34:59 +01:00
Julien Valverdé 03f0b623ed Removed JSX code 2025-03-26 19:34:21 +01:00
Julien Valverdé fb6d803723 Removed JSX code 2025-03-26 19:34:14 +01:00
Julien Valverdé 972986241c ReffuseHelpers.make()
Lint / lint (push) Has been cancelled
2025-03-25 19:29:17 +01:00
Julien Valverdé 9eb0904600 Refactoring
Lint / lint (push) Successful in 13s
2025-03-24 20:35:22 +01:00
Julien Valverdé fc86c818e0 Merge branch 'next' of git.valverde.cloud:Thilawyn/reffuse into next
Lint / lint (push) Successful in 13s
2025-03-24 19:41:21 +01:00
Julien Valverdé 5a12139602 Regenerated lockfile
Lint / lint (push) Successful in 13s
Test build / test-build (pull_request) Successful in 15s
2025-03-24 19:35:56 +01:00
Julien Valverdé a0928c718f Version bump
Lint / lint (push) Successful in 13s
Test build / test-build (pull_request) Successful in 15s
2025-03-24 19:33:35 +01:00
Julien Valverdé 49d9edd4b1 Dependencies upgrade
Lint / lint (push) Successful in 14s
2025-03-24 19:29:12 +01:00
Julien Valverdé 3552c25b5c Mutation refactoring
Lint / lint (push) Successful in 13s
2025-03-24 19:07:11 +01:00
Julien Valverdé 516e0a465d Ref state fix
Lint / lint (push) Successful in 16s
2025-03-24 18:38:14 +01:00
Julien Valverdé 7cf5367409 Tests
Lint / lint (push) Successful in 12s
2025-03-24 17:34:50 +01:00
Julien Valverdé 3b237c0588 Query refactoring
Lint / lint (push) Successful in 13s
2025-03-24 17:30:41 +01:00
Julien Valverdé d9aa42d23a Fix
Lint / lint (push) Successful in 13s
2025-03-24 12:16:03 +01:00
Julien Valverdé fd3213c53f Fix
Lint / lint (push) Successful in 13s
2025-03-24 12:06:03 +01:00
Julien Valverdé baa8c92221 Query refactoring
Lint / lint (push) Successful in 14s
2025-03-24 12:03:55 +01:00
Julien Valverdé d55b432846 Refactoring
Lint / lint (push) Successful in 13s
2025-03-23 23:58:05 +01:00
Julien Valverdé 6266c7506e Example fix
Lint / lint (push) Successful in 13s
2025-03-23 07:32:11 +01:00
Julien Valverdé 043e966e45 ErrorHandler work
Lint / lint (push) Successful in 14s
2025-03-23 07:25:03 +01:00
Julien Valverdé 88fab2c7d7 ErrorHandler refactoring
Lint / lint (push) Failing after 15s
2025-03-23 06:08:35 +01:00
Julien Valverdé 224ccd8e32 Fix
Lint / lint (push) Successful in 14s
2025-03-21 04:55:38 +01:00
Julien Valverdé 4cf70ada0b Fix
Lint / lint (push) Successful in 16s
2025-03-21 04:49:44 +01:00
Julien Valverdé f9bd5d4d6b Query refactoring
Lint / lint (push) Successful in 14s
2025-03-21 04:37:32 +01:00
Julien Valverdé 1ec1db0658 Mutation progress
Lint / lint (push) Successful in 14s
2025-03-21 03:38:48 +01:00
Julien Valverdé 2d94e84941 Stream fix
Lint / lint (push) Successful in 13s
2025-03-21 03:24:55 +01:00
Julien Valverdé aab83907ba Working mutation progress
Lint / lint (push) Successful in 13s
2025-03-21 02:14:36 +01:00
Julien Valverdé 8c0d6b4c8a Cleanup
Lint / lint (push) Successful in 13s
2025-03-21 01:24:52 +01:00
Julien Valverdé d82d1d1c29 Refactoring
Lint / lint (push) Successful in 14s
2025-03-21 01:23:47 +01:00
Julien Valverdé 0f09573948 Mutation services
Lint / lint (push) Failing after 14s
2025-03-20 07:10:55 +01:00
Julien Valverdé 2b6b36713e MutationRunner work
Lint / lint (push) Successful in 14s
2025-03-20 04:31:38 +01:00
Julien Valverdé 5d0aecc9d5 QueryProgress
Lint / lint (push) Successful in 14s
2025-03-19 05:13:54 +01:00
Julien Valverdé f21d8b2d8a QueryProgress
Lint / lint (push) Successful in 14s
2025-03-18 03:11:39 +01:00
Julien Valverdé f85173fa68 Fix
Lint / lint (push) Successful in 30s
2025-03-18 02:46:41 +01:00
Julien Valverdé 65a124de1f Mutation tests
Lint / lint (push) Successful in 13s
2025-03-17 05:52:13 +01:00
Julien Valverdé 16893761c6 Mutation refactoring
Lint / lint (push) Successful in 13s
2025-03-17 05:34:19 +01:00
Julien Valverdé 3fdc2e31eb Mutation example
Lint / lint (push) Successful in 17s
2025-03-17 02:36:13 +01:00
Julien Valverdé 8636a28f2f Working mutations
Lint / lint (push) Successful in 14s
2025-03-17 02:15:27 +01:00
Julien Valverdé d56578da8f useMutation
Lint / lint (push) Successful in 13s
2025-03-16 06:50:20 +01:00
Julien Valverdé 299109d421 Mutation fix
Lint / lint (push) Successful in 14s
2025-03-16 06:25:02 +01:00
Julien Valverdé 4995b2949f MutationRunner
Lint / lint (push) Successful in 13s
2025-03-16 05:20:55 +01:00
Julien Valverdé 6e6e675709 MutationRunner 2025-03-16 05:20:37 +01:00
Julien Valverdé b04860aa25 Cleanup
Lint / lint (push) Successful in 13s
2025-03-16 04:32:51 +01:00
Julien Valverdé e9e17ac211 Fix
Lint / lint (push) Successful in 12s
2025-03-16 04:11:25 +01:00
Julien Valverdé 1f0ff725ff Fix
Lint / lint (push) Successful in 13s
2025-03-16 04:05:39 +01:00
Julien Valverdé 447d89982c Fix
Lint / lint (push) Successful in 13s
2025-03-16 03:34:54 +01:00
Julien Valverdé 778ee27795 ErrorHandler refactoring
Lint / lint (push) Successful in 16s
2025-03-16 03:33:01 +01:00
Julien Valverdé 077816efb6 Fix
Lint / lint (push) Successful in 13s
2025-03-16 03:23:12 +01:00
Julien Valverdé e4bacd1ca7 Working QueryClient refactoring
Lint / lint (push) Successful in 13s
2025-03-16 03:19:12 +01:00
Julien Valverdé 0e2c0db28f QueryClient refactoring
Lint / lint (push) Successful in 13s
2025-03-16 02:52:49 +01:00
Julien Valverdé c943d81702 QueryClient.make
Lint / lint (push) Successful in 12s
2025-03-15 22:27:15 +01:00
Julien Valverdé c2bc406a5f Fixed query error handler
Lint / lint (push) Successful in 13s
2025-03-15 06:43:47 +01:00
Julien Valverdé 4e778b6c95 VQueryErrorHandler
Lint / lint (push) Successful in 12s
2025-03-15 05:12:38 +01:00
Julien Valverdé 0437fa5dcc QueryErrorHandler work
Lint / lint (push) Successful in 16s
2025-03-15 02:30:37 +01:00
Julien Valverdé 5614b8df38 Fix
Lint / lint (push) Successful in 13s
2025-03-15 00:52:00 +01:00
Julien Valverdé 70b6c4434e Tests
Lint / lint (push) Successful in 16s
2025-03-14 22:07:53 +01:00
Julien Valverdé 2e8dfbc988 QueryClient
Lint / lint (push) Successful in 13s
2025-03-14 22:00:53 +01:00
Julien Valverdé abc47c4647 Fix
Lint / lint (push) Failing after 12s
2025-03-14 05:04:49 +01:00
Julien Valverdé eedd2a7f2a makeTag
Lint / lint (push) Failing after 12s
2025-03-14 04:57:07 +01:00
Julien Valverdé f4ab575a8d QueryExtension work
Lint / lint (push) Failing after 13s
2025-03-14 04:24:56 +01:00
Julien Valverdé 747e2c6056 Done QueryClient
Lint / lint (push) Successful in 14s
2025-03-14 04:13:14 +01:00
Julien Valverdé 68c68417d8 QueryClient work
Lint / lint (push) Successful in 12s
2025-03-14 03:56:54 +01:00
Julien Valverdé ed384a62a8 QueryClient work
Lint / lint (push) Failing after 15s
2025-03-14 03:26:28 +01:00
Julien Valverdé 3a1748bb39 QueryClient tests
Lint / lint (push) Successful in 18s
2025-03-13 22:31:50 +01:00
Julien Valverdé 66b8fd2c2e Fix
Lint / lint (push) Successful in 13s
2025-03-12 06:37:39 +01:00
Julien Valverdé bc81c443ab Query work
Lint / lint (push) Successful in 13s
2025-03-11 21:19:57 +01:00
Julien Valverdé ee5dbe3766 Query work
Lint / lint (push) Successful in 13s
2025-03-11 20:39:56 +01:00
Julien Valverdé 825de84cef Cleanup
Lint / lint (push) Successful in 13s
2025-03-11 03:12:36 +01:00
Julien Valverdé d6011f7897 MutationRunner
Lint / lint (push) Failing after 18s
2025-03-11 02:17:50 +01:00
Julien Valverdé 8d4bce9e53 Merge branch 'next' of git.valverde.cloud:Thilawyn/reffuse into next
Lint / lint (push) Successful in 12s
2025-03-11 01:45:49 +01:00
Julien Valverdé f7dd4e51f5 Doc update
Lint / lint (push) Successful in 13s
Test build / test-build (pull_request) Successful in 16s
2025-03-11 01:36:13 +01:00
Julien Valverdé 8772e25ff5 CI update
Lint / lint (push) Successful in 13s
2025-03-10 18:44:08 +01:00
Julien Valverdé 94a0864132 Query refactoring
Lint / lint (push) Successful in 13s
2025-03-10 18:37:45 +01:00
Julien Valverdé be8098fb7d Query work
Lint / lint (push) Successful in 12s
2025-03-10 01:56:11 +01:00
Julien Valverdé 7021e604ed Cleanup
Lint / lint (push) Successful in 13s
2025-03-09 19:14:20 +01:00
Julien Valverdé 1fd2a9ffbe Cleanup
Lint / lint (push) Successful in 17s
2025-03-09 18:35:48 +01:00
Julien Valverdé 1ed73dc3ac Cleanup
Lint / lint (push) Successful in 13s
2025-03-09 18:21:35 +01:00
Julien Valverdé c689778cea Working query
Lint / lint (push) Successful in 15s
2025-03-09 18:08:52 +01:00
Julien Valverdé da2a32001c Query work
Lint / lint (push) Failing after 13s
2025-03-08 01:56:50 +01:00
Julien Valverdé 5ac3a932d9 Query work
Lint / lint (push) Failing after 12s
2025-03-07 23:17:32 +01:00
Julien Valverdé 7935293bc3 Query work
Lint / lint (push) Successful in 15s
2025-03-07 22:23:44 +01:00
Julien Valverdé cabceaffcd Key work
Lint / lint (push) Successful in 13s
2025-03-07 04:26:39 +01:00
Julien Valverdé d239a11cdc Service query
Lint / lint (push) Successful in 13s
2025-03-06 20:00:40 +01:00
Julien Valverdé fad61afce7 Fix
Lint / lint (push) Successful in 12s
2025-03-06 17:32:30 +01:00
Julien Valverdé 11fd4941c0 Fix
Lint / lint (push) Successful in 12s
2025-03-06 17:26:08 +01:00
Julien Valverdé 7bebc39a87 Fix
Lint / lint (push) Successful in 12s
2025-03-06 17:22:27 +01:00
Julien Valverdé 3bc0cc6586 Cleanup
Lint / lint (push) Successful in 12s
2025-03-06 03:31:21 +01:00
Julien Valverdé f99d18b846 Cleanup fix
Lint / lint (push) Successful in 13s
2025-03-06 03:15:43 +01:00
Julien Valverdé d61339ea6a Query work
Lint / lint (push) Successful in 12s
2025-03-05 02:23:43 +01:00
Julien Valverdé 3659d3f342 Version bump
Lint / lint (push) Successful in 13s
2025-03-05 01:50:08 +01:00
Julien Valverdé 1e8a5d412f Refresh on window focus
Lint / lint (push) Successful in 13s
2025-03-05 00:44:13 +01:00
Julien Valverdé 86539f33f0 Fix
Lint / lint (push) Successful in 13s
2025-03-05 00:24:38 +01:00
Julien Valverdé 8fa24b1791 Query work
Lint / lint (push) Successful in 13s
2025-03-05 00:16:13 +01:00
Julien Valverdé adaadf13b2 Working service query
Lint / lint (push) Successful in 13s
2025-03-04 23:18:35 +01:00
Julien Valverdé 3af7c3bf7a Query service work
Lint / lint (push) Failing after 11s
2025-03-04 22:44:40 +01:00
Julien Valverdé 00b7228073 Refetch on focus
Lint / lint (push) Successful in 13s
2025-03-04 02:15:31 +01:00
Julien Valverdé c2b2b1b96e Dependencies fix
Lint / lint (push) Successful in 13s
2025-03-04 02:04:29 +01:00
Julien Valverdé 74cf37e3a3 Query example
Lint / lint (push) Successful in 14s
2025-03-04 01:35:52 +01:00
Julien Valverdé 98091d4598 Refactoring
Lint / lint (push) Successful in 12s
2025-03-04 01:22:51 +01:00
Julien Valverdé b2f1626268 Working query
Lint / lint (push) Successful in 13s
2025-03-04 01:19:42 +01:00
Julien Valverdé 40e8bf6a1f Query work
Lint / lint (push) Successful in 13s
2025-03-03 19:42:33 +01:00
Julien Valverdé 9c96741c8e Fix
Lint / lint (push) Successful in 13s
2025-03-03 03:37:39 +01:00
Julien Valverdé 3fa9b7d821 Working query
Lint / lint (push) Successful in 13s
2025-03-02 20:14:45 +01:00
Julien Valverdé 6b0f2f33cb Query work
Lint / lint (push) Failing after 13s
2025-03-02 02:48:19 +01:00
Julien Valverdé 2e00db5778 Query work
Lint / lint (push) Failing after 43s
2025-03-02 01:11:18 +01:00
Julien Valverdé 660f32a171 Fix
Lint / lint (push) Successful in 13s
2025-02-28 17:24:40 +01:00
Julien Valverdé 3f2639fda1 Query work
Lint / lint (push) Successful in 13s
2025-02-28 16:08:08 +01:00
Julien Valverdé f76b3f333a Query work
Lint / lint (push) Successful in 13s
2025-02-28 02:13:23 +01:00
Julien Valverdé 3b407c6b4f Query work
Lint / lint (push) Successful in 17s
2025-02-28 01:06:11 +01:00
Julien Valverdé b01b95a9d5 Query work
Lint / lint (push) Successful in 12s
2025-02-28 00:27:22 +01:00
Julien Valverdé 91b95ea6af useRefState refactpro
Lint / lint (push) Successful in 13s
2025-02-27 18:32:57 +01:00
Julien Valverdé 7c99d1ff3d Working useQuery
Lint / lint (push) Successful in 13s
2025-02-27 01:19:09 +01:00
Julien Valverdé ae815553f2 Query work
Lint / lint (push) Successful in 13s
2025-02-26 23:57:03 +01:00
Julien Valverdé 86a96cbcce extension-query
Lint / lint (push) Failing after 7s
2025-02-26 21:17:09 +01:00
Julien Valverdé 538b3a415d Cleanup
Lint / lint (push) Successful in 12s
2025-02-26 20:50:05 +01:00
Julien Valverdé 5b023678f4 Merge branch 'master' into next
Lint / lint (push) Successful in 11s
2025-02-26 20:47:00 +01:00
Julien Valverdé 9266697aa4 Merge branch 'next' of git.valverde.cloud:Thilawyn/reffuse into next
Lint / lint (push) Successful in 12s
2025-02-26 19:29:48 +01:00
Julien Valverdé ad81bf9ed8 Cleanup
Lint / lint (push) Successful in 11s
Test build / test-build (pull_request) Successful in 13s
2025-02-26 19:25:21 +01:00
Julien Valverdé e92087e593 Turbo fix
Lint / lint (push) Successful in 12s
Test build / test-build (pull_request) Successful in 13s
2025-02-26 19:23:49 +01:00
Julien Valverdé e182e6ab5c README update
Lint / lint (push) Successful in 12s
Test build / test-build (pull_request) Failing after 15s
2025-02-26 19:13:49 +01:00
Julien Valverdé 89175be558 README work
Lint / lint (push) Successful in 12s
2025-02-26 14:30:59 +01:00
Julien Valverdé 4df90a0f1c README work
Lint / lint (push) Successful in 12s
2025-02-26 14:05:12 +01:00
Julien Valverdé 693c7b2db8 Reffuse context refactoring
Lint / lint (push) Successful in 12s
2025-02-26 13:40:52 +01:00
Julien Valverdé 5f60d03d83 Fix
Lint / lint (push) Successful in 12s
2025-02-25 23:19:44 +01:00
Julien Valverdé ea768218a0 Deps API change
Lint / lint (push) Successful in 12s
2025-02-25 23:11:58 +01:00
Julien Valverdé 3b4eb750ed Version bump
Lint / lint (push) Successful in 12s
2025-02-25 22:55:45 +01:00
Julien Valverdé 47aa130486 CI fix
Lint / lint (push) Successful in 12s
2025-02-25 22:53:07 +01:00
Julien Valverdé 02da3df8eb CI fix
Lint / lint (push) Successful in 12s
2025-02-25 22:45:55 +01:00
Julien Valverdé 8d276d2fbf Dependencies
Lint / lint (push) Failing after 8s
2025-02-25 22:16:53 +01:00
Julien Valverdé af077d34aa Turbo setup
Lint / lint (push) Failing after 13s
2025-02-25 22:07:18 +01:00
Julien Valverdé 618cee4028 Callback tests
Lint / lint (push) Failing after 11s
2025-02-25 18:39:19 +01:00
Julien Valverdé 8244c34d2a Callback helpers
Lint / lint (push) Failing after 10s
2025-02-25 18:29:00 +01:00
Julien Valverdé 523d835d00 Fix
Lint / lint (push) Failing after 10s
2025-02-25 17:14:07 +01:00
Julien Valverdé 15e96b8fa9 Merge branch 'plugins' of git.valverde.cloud:Thilawyn/reffuse into plugins
Lint / lint (push) Failing after 11s
2025-02-25 14:49:22 +01:00
Julien Valverdé 44de864713 API update 2025-02-25 14:48:58 +01:00
Julien Valverdé 8e1f0a27cf Lockfile
Lint / lint (push) Failing after 11s
2025-02-25 13:45:09 +01:00
Julien Valverdé 8754020323 Working lazyref extension
Lint / lint (push) Failing after 12s
2025-02-25 12:17:45 +01:00
Julien Valverdé d9a01dae0f withLazyRef
Lint / lint (push) Failing after 11s
2025-02-25 11:22:49 +01:00
Julien Valverdé 8873e81f7c Dependencies
Lint / lint (push) Successful in 10s
2025-02-25 10:31:43 +01:00
Julien Valverdé 38fcafb15c Dependencies
Lint / lint (push) Successful in 10s
2025-02-25 10:21:34 +01:00
Julien Valverdé 411397c7de Fix
Lint / lint (push) Successful in 12s
2025-02-24 21:30:13 +01:00
Julien Valverdé 85e7b54962 extension-lazyref
Lint / lint (push) Successful in 11s
2025-02-24 21:24:38 +01:00
Julien Valverdé ce3989ab77 Extension fix
Lint / lint (push) Successful in 10s
2025-02-24 21:09:44 +01:00
Julien Valverdé da0f6168f0 Fix
Lint / lint (push) Successful in 11s
2025-02-24 20:47:49 +01:00
Julien Valverdé 690dec1f1a Finalized
Lint / lint (push) Successful in 11s
2025-02-24 20:18:56 +01:00
Julien Valverdé 60274266da Extension work
Lint / lint (push) Failing after 10s
2025-02-24 20:00:02 +01:00
Julien Valverdé 28424b63cb Working extension
Lint / lint (push) Failing after 10s
2025-02-24 13:47:29 +01:00
Julien Valverdé e063eb06f7 Extension work
Lint / lint (push) Failing after 11s
2025-02-24 13:17:10 +01:00
Julien Valverdé fb5bb7fcef Cleanup
Lint / lint (push) Failing after 10s
2025-02-24 02:21:37 +01:00
Julien Valverdé 1f57f7d127 Tests
Lint / lint (push) Failing after 10s
2025-02-24 01:55:47 +01:00
Julien Valverdé e8742e5aa6 Fix
Lint / lint (push) Failing after 10s
2025-02-23 23:38:24 +01:00
Julien Valverdé be79d24d6e Tests
Lint / lint (push) Failing after 11s
2025-02-22 01:03:15 +01:00
Julien Valverdé e1349e5e03 Tests
Lint / lint (push) Failing after 11s
2025-02-21 15:44:28 +01:00
Julien Valverdé 837dcbb1cb Extension work
Lint / lint (push) Failing after 11s
2025-02-21 15:27:11 +01:00
Julien Valverdé 8252b6cbdf Extension work
Lint / lint (push) Failing after 10s
2025-02-21 05:22:19 +01:00
Julien Valverdé 256638bc06 ReffuseHelper
Lint / lint (push) Failing after 11s
2025-02-21 04:22:48 +01:00
Julien Valverdé c0097bbe81 Extension tests
Lint / lint (push) Successful in 10s
2025-02-20 14:57:46 +01:00
Julien Valverdé febeaa05d0 ReffuseExtension
Lint / lint (push) Successful in 11s
2025-02-20 14:12:56 +01:00
Julien Valverdé a71640d493 Cleanup
Lint / lint (push) Successful in 10s
2025-02-20 00:41:37 +01:00
Julien Valverdé b636a709f3 Tests
Lint / lint (push) Successful in 11s
2025-02-20 00:39:15 +01:00
Julien Valverdé fffbd01b5e Pipeable API tests
Lint / lint (push) Successful in 11s
2025-02-20 00:21:43 +01:00
Julien Valverdé 36d5414d10 Fix
Lint / lint (push) Successful in 44s
2025-02-19 23:59:34 +01:00
Julien Valverdé 65810a6d79 usePromise
Lint / lint (push) Successful in 10s
2025-02-19 23:44:02 +01:00
Julien Valverdé 9e7b30fbb4 useFork refactoring
Lint / lint (push) Successful in 11s
2025-02-19 23:24:15 +01:00
Julien Valverdé 6c843562ab usePromiseScoped fork implementation
Lint / lint (push) Successful in 10s
2025-02-18 23:47:32 +01:00
Julien Valverdé 809f512d11 Fix
Lint / lint (push) Successful in 10s
2025-02-18 22:33:49 +01:00
Julien Valverdé e71239b903 usePromiseScoped
Lint / lint (push) Successful in 10s
2025-02-18 22:28:49 +01:00
Julien Valverdé bfcc097882 usePromise
Lint / lint (push) Successful in 11s
2025-02-18 15:25:46 +01:00
Julien Valverdé 933b061b5d Promise tests
Lint / lint (push) Successful in 11s
2025-02-18 05:18:34 +01:00
Julien Valverdé 734c84824c Implement Pipeable
Lint / lint (push) Successful in 10s
2025-02-18 04:30:10 +01:00
Julien Valverdé e83e86f8f1 Promise tests
Lint / lint (push) Successful in 11s
2025-02-18 02:56:05 +01:00
Julien Valverdé bebbc1d7de Promise tests
Lint / lint (push) Successful in 11s
2025-02-18 02:23:40 +01:00
Julien Valverdé a7a0951b61 Dependencies fix
Lint / lint (push) Successful in 11s
2025-02-18 01:08:26 +01:00
Julien Valverdé 1b1a1961bc Dependencies upgrade
Lint / lint (push) Failing after 13s
2025-02-17 00:16:41 +01:00
8 changed files with 224 additions and 108 deletions
+27 -1
View File
@@ -19,6 +19,7 @@ import { Route as LazyrefImport } from './routes/lazyref'
import { Route as CountImport } from './routes/count' import { Route as CountImport } from './routes/count'
import { Route as BlankImport } from './routes/blank' import { Route as BlankImport } from './routes/blank'
import { Route as IndexImport } from './routes/index' import { Route as IndexImport } from './routes/index'
import { Route as StreamsPullImport } from './routes/streams/pull'
import { Route as QueryUsequeryImport } from './routes/query/usequery' import { Route as QueryUsequeryImport } from './routes/query/usequery'
import { Route as QueryUsemutationImport } from './routes/query/usemutation' import { Route as QueryUsemutationImport } from './routes/query/usemutation'
import { Route as QueryServiceImport } from './routes/query/service' import { Route as QueryServiceImport } from './routes/query/service'
@@ -73,6 +74,12 @@ const IndexRoute = IndexImport.update({
getParentRoute: () => rootRoute, getParentRoute: () => rootRoute,
} as any) } as any)
const StreamsPullRoute = StreamsPullImport.update({
id: '/streams/pull',
path: '/streams/pull',
getParentRoute: () => rootRoute,
} as any)
const QueryUsequeryRoute = QueryUsequeryImport.update({ const QueryUsequeryRoute = QueryUsequeryImport.update({
id: '/query/usequery', id: '/query/usequery',
path: '/query/usequery', path: '/query/usequery',
@@ -172,6 +179,13 @@ declare module '@tanstack/react-router' {
preLoaderRoute: typeof QueryUsequeryImport preLoaderRoute: typeof QueryUsequeryImport
parentRoute: typeof rootRoute parentRoute: typeof rootRoute
} }
'/streams/pull': {
id: '/streams/pull'
path: '/streams/pull'
fullPath: '/streams/pull'
preLoaderRoute: typeof StreamsPullImport
parentRoute: typeof rootRoute
}
} }
} }
@@ -189,6 +203,7 @@ export interface FileRoutesByFullPath {
'/query/service': typeof QueryServiceRoute '/query/service': typeof QueryServiceRoute
'/query/usemutation': typeof QueryUsemutationRoute '/query/usemutation': typeof QueryUsemutationRoute
'/query/usequery': typeof QueryUsequeryRoute '/query/usequery': typeof QueryUsequeryRoute
'/streams/pull': typeof StreamsPullRoute
} }
export interface FileRoutesByTo { export interface FileRoutesByTo {
@@ -203,6 +218,7 @@ export interface FileRoutesByTo {
'/query/service': typeof QueryServiceRoute '/query/service': typeof QueryServiceRoute
'/query/usemutation': typeof QueryUsemutationRoute '/query/usemutation': typeof QueryUsemutationRoute
'/query/usequery': typeof QueryUsequeryRoute '/query/usequery': typeof QueryUsequeryRoute
'/streams/pull': typeof StreamsPullRoute
} }
export interface FileRoutesById { export interface FileRoutesById {
@@ -218,6 +234,7 @@ export interface FileRoutesById {
'/query/service': typeof QueryServiceRoute '/query/service': typeof QueryServiceRoute
'/query/usemutation': typeof QueryUsemutationRoute '/query/usemutation': typeof QueryUsemutationRoute
'/query/usequery': typeof QueryUsequeryRoute '/query/usequery': typeof QueryUsequeryRoute
'/streams/pull': typeof StreamsPullRoute
} }
export interface FileRouteTypes { export interface FileRouteTypes {
@@ -234,6 +251,7 @@ export interface FileRouteTypes {
| '/query/service' | '/query/service'
| '/query/usemutation' | '/query/usemutation'
| '/query/usequery' | '/query/usequery'
| '/streams/pull'
fileRoutesByTo: FileRoutesByTo fileRoutesByTo: FileRoutesByTo
to: to:
| '/' | '/'
@@ -247,6 +265,7 @@ export interface FileRouteTypes {
| '/query/service' | '/query/service'
| '/query/usemutation' | '/query/usemutation'
| '/query/usequery' | '/query/usequery'
| '/streams/pull'
id: id:
| '__root__' | '__root__'
| '/' | '/'
@@ -260,6 +279,7 @@ export interface FileRouteTypes {
| '/query/service' | '/query/service'
| '/query/usemutation' | '/query/usemutation'
| '/query/usequery' | '/query/usequery'
| '/streams/pull'
fileRoutesById: FileRoutesById fileRoutesById: FileRoutesById
} }
@@ -275,6 +295,7 @@ export interface RootRouteChildren {
QueryServiceRoute: typeof QueryServiceRoute QueryServiceRoute: typeof QueryServiceRoute
QueryUsemutationRoute: typeof QueryUsemutationRoute QueryUsemutationRoute: typeof QueryUsemutationRoute
QueryUsequeryRoute: typeof QueryUsequeryRoute QueryUsequeryRoute: typeof QueryUsequeryRoute
StreamsPullRoute: typeof StreamsPullRoute
} }
const rootRouteChildren: RootRouteChildren = { const rootRouteChildren: RootRouteChildren = {
@@ -289,6 +310,7 @@ const rootRouteChildren: RootRouteChildren = {
QueryServiceRoute: QueryServiceRoute, QueryServiceRoute: QueryServiceRoute,
QueryUsemutationRoute: QueryUsemutationRoute, QueryUsemutationRoute: QueryUsemutationRoute,
QueryUsequeryRoute: QueryUsequeryRoute, QueryUsequeryRoute: QueryUsequeryRoute,
StreamsPullRoute: StreamsPullRoute,
} }
export const routeTree = rootRoute export const routeTree = rootRoute
@@ -311,7 +333,8 @@ export const routeTree = rootRoute
"/todos", "/todos",
"/query/service", "/query/service",
"/query/usemutation", "/query/usemutation",
"/query/usequery" "/query/usequery",
"/streams/pull"
] ]
}, },
"/": { "/": {
@@ -346,6 +369,9 @@ export const routeTree = rootRoute
}, },
"/query/usequery": { "/query/usequery": {
"filePath": "query/usequery.tsx" "filePath": "query/usequery.tsx"
},
"/streams/pull": {
"filePath": "streams/pull.tsx"
} }
} }
} }
+4 -5
View File
@@ -1,6 +1,6 @@
import { R } from "@/reffuse" import { R } from "@/reffuse"
import { createFileRoute } from "@tanstack/react-router" import { createFileRoute } from "@tanstack/react-router"
import { Ref } from "effect" import { Effect, Ref } from "effect"
export const Route = createFileRoute("/count")({ export const Route = createFileRoute("/count")({
@@ -11,14 +11,13 @@ function Count() {
const runSync = R.useRunSync() const runSync = R.useRunSync()
const countRef = R.useRef(0) const countRef = R.useRef(() => Effect.succeed(0))
const [count] = R.useRefState(countRef) const [count] = R.useSubscribeRefs(countRef)
return ( return (
<div className="container mx-auto"> <div className="container mx-auto">
{/* <button onClick={() => setCount((count) => count + 1)}> */} <button onClick={() => runSync(Ref.update(countRef, count => count + 1))}>
<button onClick={() => Ref.update(countRef, count => count + 1).pipe(runSync)}>
count is {count} count is {count}
</button> </button>
</div> </div>
@@ -14,7 +14,7 @@ export const Route = createFileRoute("/query/service")({
function RouteComponent() { function RouteComponent() {
const query = R.useQuery({ const query = R.useQuery({
key: R.useStreamFromValues(["uuid4", 10 as number]), key: R.useStreamFromReactiveValues(["uuid4", 10 as number]),
query: ([, count]) => Console.log(`Querying ${ count } IDs...`).pipe( query: ([, count]) => Console.log(`Querying ${ count } IDs...`).pipe(
Effect.andThen(Effect.sleep("500 millis")), Effect.andThen(Effect.sleep("500 millis")),
Effect.andThen(HttpClient.get(`https://www.uuidtools.com/api/generate/v4/count/${ count }`)), Effect.andThen(HttpClient.get(`https://www.uuidtools.com/api/generate/v4/count/${ count }`)),
@@ -20,7 +20,7 @@ function RouteComponent() {
const [count, setCount] = useState(1) const [count, setCount] = useState(1)
const query = R.useQuery({ const query = R.useQuery({
key: R.useStreamFromValues(["uuid4", count]), key: R.useStreamFromReactiveValues(["uuid4", count]),
query: ([, count]) => Console.log(`Querying ${ count } IDs...`).pipe( query: ([, count]) => Console.log(`Querying ${ count } IDs...`).pipe(
Effect.andThen(Effect.sleep("500 millis")), Effect.andThen(Effect.sleep("500 millis")),
Effect.andThen(HttpClient.get(`https://www.uuidtools.com/api/generate/v4/count/${ count }`)), Effect.andThen(HttpClient.get(`https://www.uuidtools.com/api/generate/v4/count/${ count }`)),
@@ -0,0 +1,23 @@
import { R } from "@/reffuse"
import { Button, Flex, Text } from "@radix-ui/themes"
import { createFileRoute } from "@tanstack/react-router"
import { Option, Random, Stream } from "effect"
import { useMemo } from "react"
export const Route = createFileRoute("/streams/pull")({
component: RouteComponent,
})
function RouteComponent() {
const stream = useMemo(() => Stream.repeatEffect(Random.nextInt), [])
const [value, pull] = R.usePullStream(stream)
const pullNext = R.useCallbackSync(() => pull, [pull])
return (
<Flex direction="column" align="center" gap="2">
{Option.isSome(value) && <Text>{value.value}</Text>}
<Button onClick={pullNext}>Pull next</Button>
</Flex>
)
}
+17 -37
View File
@@ -1,8 +1,12 @@
import { R } from "@/reffuse" import { R } from "@/reffuse"
import { Button, Flex, Text } from "@radix-ui/themes" import { Button, Flex } from "@radix-ui/themes"
import { createFileRoute } from "@tanstack/react-router" import { createFileRoute } from "@tanstack/react-router"
import { GetRandomValues, makeUuid4 } from "@typed/id" import { GetRandomValues, makeUuid4 } from "@typed/id"
import { Console, Effect, Ref } from "effect" import { Console, Effect, Scope } from "effect"
import { useEffect, useState } from "react"
const makeUuid = Effect.provide(makeUuid4, GetRandomValues.CryptoRandom)
export const Route = createFileRoute("/tests")({ export const Route = createFileRoute("/tests")({
@@ -10,48 +14,24 @@ export const Route = createFileRoute("/tests")({
}) })
function RouteComponent() { function RouteComponent() {
const deepRef = R.useRef({ value: "poulet" }) const runSync = R.useRunSync()
const deepValueRef = R.useSubRef(deepRef, ["value"])
// const value = R.useMemoScoped(Effect.addFinalizer(() => Console.log("cleanup")).pipe( const [uuid, setUuid] = useState(R.useMemo(() => makeUuid, []))
// Effect.andThen(makeUuid4), const generateUuid = R.useCallbackSync(() => makeUuid.pipe(
// Effect.provide(GetRandomValues.CryptoRandom), Effect.tap(v => Effect.sync(() => setUuid(v)))
// ), [])
// console.log(value)
R.useFork(() => Effect.addFinalizer(() => Console.log("cleanup")).pipe(
Effect.andThen(Console.log("ouient")),
Effect.delay("1 second"),
), []) ), [])
const scope = R.useScope([uuid])
const uuidRef = R.useRef("none") useEffect(() => Effect.addFinalizer(() => Console.log("Scope cleanup!")).pipe(
const anotherRef = R.useRef(69) Effect.andThen(Console.log("Scope changed")),
Effect.provideService(Scope.Scope, scope),
runSync,
const logValue = R.useCallbackSync(Effect.fn(function*(value: string) { ), [scope, runSync])
yield* Effect.log(value)
}), [])
const generateUuid = R.useCallbackSync(() => makeUuid4.pipe(
Effect.provide(GetRandomValues.CryptoRandom),
Effect.tap(v => Ref.set(uuidRef, v)),
Effect.tap(v => Ref.set(deepValueRef, v)),
), [])
return ( return (
<Flex direction="row" justify="center" align="center" gap="2"> <Flex direction="row" justify="center" align="center" gap="2">
<R.SubscribeRefs refs={[uuidRef, anotherRef]}> <Button onClick={generateUuid}>Generate UUID</Button>
{(uuid, anotherRef) => <Text>{uuid} / {anotherRef}</Text>}
</R.SubscribeRefs>
<R.SubscribeRefs refs={[deepRef, deepValueRef]}>
{(deep, deepValue) => <Text>{JSON.stringify(deep)} / {deepValue}</Text>}
</R.SubscribeRefs>
<Button onClick={() => logValue("test")}>Log value</Button>
<Button onClick={() => generateUuid()}>Generate UUID</Button>
</Flex> </Flex>
) )
} }
+1 -1
View File
@@ -16,7 +16,7 @@ export function VTodos() {
), []) ), [])
const todosRef = R.useMemo(() => TodosState.TodosState.pipe(Effect.map(state => state.todos)), []) const todosRef = R.useMemo(() => TodosState.TodosState.pipe(Effect.map(state => state.todos)), [])
const [todos] = R.useRefState(todosRef) const [todos] = R.useSubscribeRefs(todosRef)
return ( return (
+150 -62
View File
@@ -1,4 +1,4 @@
import { type Context, Effect, ExecutionStrategy, Exit, type Fiber, type Layer, Option, pipe, Pipeable, Queue, Ref, Runtime, Scope, Stream, SubscriptionRef } from "effect" import { Chunk, type Context, Effect, ExecutionStrategy, Exit, type Fiber, flow, type Layer, Match, Option, pipe, Pipeable, Queue, Ref, Runtime, Scope, Stream, SubscriptionRef } from "effect"
import * as React from "react" import * as React from "react"
import * as ReffuseContext from "./ReffuseContext.js" import * as ReffuseContext from "./ReffuseContext.js"
import * as ReffuseRuntime from "./ReffuseRuntime.js" import * as ReffuseRuntime from "./ReffuseRuntime.js"
@@ -14,6 +14,10 @@ export interface ScopeOptions {
readonly finalizerExecutionStrategy?: ExecutionStrategy.ExecutionStrategy readonly finalizerExecutionStrategy?: ExecutionStrategy.ExecutionStrategy
} }
export interface UseScopeOptions extends RenderOptions, ScopeOptions {
readonly finalizerExecutionMode?: "sync" | "fork"
}
export type RefsA<T extends readonly SubscriptionRef.SubscriptionRef<any>[]> = { export type RefsA<T extends readonly SubscriptionRef.SubscriptionRef<any>[]> = {
[K in keyof T]: Effect.Effect.Success<T[K]> [K in keyof T]: Effect.Effect.Success<T[K]>
} }
@@ -88,6 +92,55 @@ export abstract class ReffuseNamespace<R> {
), [runtime, context]) ), [runtime, context])
} }
useScope<R>(
this: ReffuseNamespace<R>,
deps: React.DependencyList = [],
options?: UseScopeOptions,
): Scope.Scope {
const runSync = this.useRunSync()
const runFork = this.useRunFork()
const [isInitialRun, initialScope] = React.useMemo(() => runSync(Effect.all([
Ref.make(true),
Scope.make(options?.finalizerExecutionStrategy ?? ExecutionStrategy.sequential),
])), [])
const [scope, setScope] = React.useState(initialScope)
React.useEffect(() => isInitialRun.pipe(
Effect.if({
onTrue: () => Effect.as(
Ref.set(isInitialRun, false),
() => Scope.close(initialScope, Exit.void).pipe(
effect => Match.value(options?.finalizerExecutionMode ?? "sync").pipe(
Match.when("sync", () => { runSync(effect) }),
Match.when("fork", () => { runFork(effect) }),
Match.exhaustive,
)
),
),
onFalse: () => Scope.make(options?.finalizerExecutionStrategy).pipe(
Effect.tap(v => Effect.sync(() => setScope(v))),
Effect.map(v => () => Scope.close(v, Exit.void).pipe(
effect => Match.value(options?.finalizerExecutionMode ?? "sync").pipe(
Match.when("sync", () => { runSync(effect) }),
Match.when("fork", () => { runFork(effect) }),
Match.exhaustive,
)
)),
),
}),
runSync,
), [
...options?.doNotReExecuteOnRuntimeOrContextChange ? [] : [runSync, runFork],
...deps,
])
return scope
}
/** /**
* Reffuse equivalent to `React.useMemo`. * Reffuse equivalent to `React.useMemo`.
* *
@@ -111,53 +164,6 @@ export abstract class ReffuseNamespace<R> {
]) ])
} }
useMemoScoped<A, E, R>(
this: ReffuseNamespace<R>,
effect: () => Effect.Effect<A, E, R | Scope.Scope>,
deps: React.DependencyList,
options?: RenderOptions & ScopeOptions,
): A {
const runSync = this.useRunSync()
const [isInitialRun, initialScope, initialValue] = React.useMemo(() => Effect.Do.pipe(
Effect.bind("isInitialRun", () => Ref.make(true)),
Effect.bind("scope", () => Scope.make(options?.finalizerExecutionStrategy)),
Effect.bind("value", ({ scope }) => Effect.provideService(effect(), Scope.Scope, scope)),
Effect.map(({ isInitialRun, scope, value }) => [isInitialRun, scope, value] as const),
runSync,
), [])
const [value, setValue] = React.useState(initialValue)
React.useEffect(() => isInitialRun.pipe(
Effect.if({
onTrue: () => Ref.set(isInitialRun, false).pipe(
Effect.map(() =>
() => runSync(Scope.close(initialScope, Exit.void))
)
),
onFalse: () => Effect.Do.pipe(
Effect.bind("scope", () => Scope.make(options?.finalizerExecutionStrategy)),
Effect.bind("value", ({ scope }) => Effect.provideService(effect(), Scope.Scope, scope)),
Effect.tap(({ value }) =>
Effect.sync(() => setValue(value))
),
Effect.map(({ scope }) =>
() => runSync(Scope.close(scope, Exit.void))
),
),
}),
runSync,
), [
...options?.doNotReExecuteOnRuntimeOrContextChange ? [] : [runSync],
...deps,
])
return value
}
/** /**
* Reffuse equivalent to `React.useEffect`. * Reffuse equivalent to `React.useEffect`.
* *
@@ -378,17 +384,26 @@ export abstract class ReffuseNamespace<R> {
]) ])
} }
useRef<A, R>( useRef<A, E, R>(
this: ReffuseNamespace<R>, this: ReffuseNamespace<R>,
value: A, initialValue: () => Effect.Effect<A, E, R>,
): SubscriptionRef.SubscriptionRef<A> { ): SubscriptionRef.SubscriptionRef<A> {
return this.useMemo( return this.useMemo(
() => SubscriptionRef.make(value), () => Effect.flatMap(initialValue(), SubscriptionRef.make),
[], [],
{ doNotReExecuteOnRuntimeOrContextChange: true }, // Do not recreate the ref when the context changes { doNotReExecuteOnRuntimeOrContextChange: true }, // Do not recreate the ref when the context changes
) )
} }
useRefFromReactiveValue<A, R>(
this: ReffuseNamespace<R>,
value: A,
): SubscriptionRef.SubscriptionRef<A> {
const ref = this.useRef(() => Effect.succeed(value))
this.useEffect(() => Ref.set(ref, value), [value], { doNotReExecuteOnRuntimeOrContextChange: true })
return ref
}
useSubRef<B, const P extends PropertyPath.Paths<B>, R>( useSubRef<B, const P extends PropertyPath.Paths<B>, R>(
this: ReffuseNamespace<R>, this: ReffuseNamespace<R>,
parent: SubscriptionRef.SubscriptionRef<B>, parent: SubscriptionRef.SubscriptionRef<B>,
@@ -455,7 +470,7 @@ export abstract class ReffuseNamespace<R> {
return [reactStateValue, setValue] return [reactStateValue, setValue]
} }
useStreamFromValues<const A extends React.DependencyList, R>( useStreamFromReactiveValues<const A extends React.DependencyList, R>(
this: ReffuseNamespace<R>, this: ReffuseNamespace<R>,
values: A, values: A,
): Stream.Stream<A> { ): Stream.Stream<A> {
@@ -464,23 +479,81 @@ export abstract class ReffuseNamespace<R> {
), []) ), [])
this.useEffect(() => Queue.offer(queue, values), values) this.useEffect(() => Queue.offer(queue, values), values)
return stream return stream
} }
useSubscribeStream<A, InitialA extends A | undefined, E, R>( useSubscribeStream<A, E, R>(
this: ReffuseNamespace<R>, this: ReffuseNamespace<R>,
stream: Stream.Stream<A, E, R>, stream: Stream.Stream<A, E, R>,
initialValue?: InitialA, ): Option.Option<A>
): InitialA extends A ? Option.Some<A> : Option.Option<A> { useSubscribeStream<A, E, IE, R>(
const [reactStateValue, setReactStateValue] = React.useState<Option.Option<A>>(Option.fromNullable(initialValue)) this: ReffuseNamespace<R>,
stream: Stream.Stream<A, E, R>,
initialValue: () => Effect.Effect<A, IE, R>,
): Option.Some<A>
useSubscribeStream<A, E, IE, R>(
this: ReffuseNamespace<R>,
stream: Stream.Stream<A, E, R>,
initialValue?: () => Effect.Effect<A, IE, R>,
): Option.Option<A> {
const [reactStateValue, setReactStateValue] = React.useState(this.useMemo(
() => initialValue
? Effect.map(initialValue(), Option.some)
: Effect.succeed(Option.none()),
[],
{ doNotReExecuteOnRuntimeOrContextChange: true },
))
this.useFork(() => Stream.runForEach( this.useFork(() => Stream.runForEach(
Stream.changesWith(stream, (x, y) => x === y), Stream.changesWith(stream, (x, y) => x === y),
v => Effect.sync(() => setReactStateValue(Option.some(v))), v => Effect.sync(() => setReactStateValue(Option.some(v))),
), [stream]) ), [stream])
return reactStateValue as InitialA extends A ? Option.Some<A> : Option.Option<A> return reactStateValue
}
usePullStream<A, E, IE, R>(
this: ReffuseNamespace<R>,
stream: Stream.Stream<A, E, R>,
): [latestValue: Option.Option<A>, pull: Effect.Effect<Chunk.Chunk<A>, Option.Option<E>>]
usePullStream<A, E, IE, R>(
this: ReffuseNamespace<R>,
stream: Stream.Stream<A, E, R>,
initialValue: () => Effect.Effect<A, IE, R>,
): [latestValue: Option.Some<A>, pull: Effect.Effect<Chunk.Chunk<A>, Option.Option<E>>]
usePullStream<A, E, IE, R>(
this: ReffuseNamespace<R>,
stream: Stream.Stream<A, E, R>,
initialValue?: () => Effect.Effect<A, IE, R>,
): [latestValue: Option.Option<A>, pull: Effect.Effect<Chunk.Chunk<A>, Option.Option<E>>] {
const scope = this.useScope([stream])
const [reactStateValue, setReactStateValue] = React.useState(this.useMemo(
() => initialValue
? Effect.map(initialValue(), Option.some)
: Effect.succeed(Option.none()),
[],
{ doNotReExecuteOnRuntimeOrContextChange: true },
))
const pull = this.useMemo(() => Effect.context<R>().pipe(
Effect.flatMap(context => Stream.toPull(Stream.changesWith(stream, (x, y) => x === y)).pipe(
Effect.map(effect => effect.pipe(
Effect.tap(flow(
Chunk.last,
v => Option.match(v, {
onSome: () => Effect.sync(() => setReactStateValue(v)),
onNone: () => Effect.void,
}),
)),
Effect.provide(context),
)),
Effect.provideService(Scope.Scope, scope),
))
), [stream, scope])
return [reactStateValue, pull]
} }
@@ -518,15 +591,30 @@ export abstract class ReffuseNamespace<R> {
return props.children(this.useRefState(props.ref)) return props.children(this.useRefState(props.ref))
} }
SubscribeStream<A, InitialA extends A | undefined, E, R>( SubscribeStream<A, E, R>(
this: ReffuseNamespace<R>, this: ReffuseNamespace<R>,
props: { props: {
readonly stream: Stream.Stream<A, E, R> readonly stream: Stream.Stream<A, E, R>
readonly initialValue?: InitialA readonly children: (latestValue: Option.Option<A>) => React.ReactNode
readonly children: (latestValue: InitialA extends A ? Option.Some<A> : Option.Option<A>) => React.ReactNode },
): React.ReactNode
SubscribeStream<A, E, IE, R>(
this: ReffuseNamespace<R>,
props: {
readonly stream: Stream.Stream<A, E, R>
readonly initialValue: () => Effect.Effect<A, IE, R>
readonly children: (latestValue: Option.Some<A>) => React.ReactNode
},
): React.ReactNode
SubscribeStream<A, E, IE, R>(
this: ReffuseNamespace<R>,
props: {
readonly stream: Stream.Stream<A, E, R>
readonly initialValue?: () => Effect.Effect<A, IE, R>
readonly children: (latestValue: Option.Some<A>) => React.ReactNode
}, },
): React.ReactNode { ): React.ReactNode {
return props.children(this.useSubscribeStream(props.stream, props.initialValue)) return props.children(this.useSubscribeStream(props.stream, props.initialValue as () => Effect.Effect<A, IE, R>))
} }
} }