@reffuse/extension-query 0.1.4 #15

Merged
Thilawyn merged 340 commits from next into master 2025-05-26 04:15:01 +02:00
3 changed files with 9 additions and 13 deletions
Showing only changes of commit 89175be558 - Show all commits

View File

@@ -1,3 +1,8 @@
# Reffuse Monorepo # Reffuse Monorepo
Reffuse is a [Effect-TS](https://effect.website/) integration for React 19+ with the aim of integrating the Effect context system within React's component hierarchy, while avoiding touching React's internals. Reffuse is a [Effect-TS](https://effect.website/) integration for React 19+ with the aim of integrating the Effect context system within React's component hierarchy, while avoiding touching React's internals.
This monorepo contains:
- [The `reffuse` library](packages/reffuse)
- [`@reffuse/extension-lazyref`](packages/extension-lazyref)
- [An example project](packges/example)

View File

@@ -1,12 +1,3 @@
# Reffuse # `@typed/lazy-ref` extension for Reffuse
[Effect-TS](https://effect.website/) integration for React 19+ with the aim of integrating the Effect context system within React's component hierarchy, while avoiding touching React's internals. ## Peer dependencies
This library is in early development. While it is (almost) feature complete and mostly usable, expect bugs and quirks. Things are still being ironed out, so ideas and criticisms are more than welcome.
Documentation is currently being written. In the meantime, you can take a look at the `packages/example` directory.
## Dependencies
(needs to be manually installed)
- `effect`
- `react` 19+

View File

@@ -228,7 +228,7 @@ export abstract class ReffuseHelpers<R> {
): void { ): void {
const runSync = this.useRunSync() const runSync = this.useRunSync()
return React.useLayoutEffect(() => { React.useLayoutEffect(() => {
const scope = Scope.make(options?.finalizerExecutionStrategy).pipe( const scope = Scope.make(options?.finalizerExecutionStrategy).pipe(
Effect.tap(scope => Effect.provideService(effect(), Scope.Scope, scope)), Effect.tap(scope => Effect.provideService(effect(), Scope.Scope, scope)),
runSync, runSync,
@@ -277,7 +277,7 @@ export abstract class ReffuseHelpers<R> {
const runSync = this.useRunSync() const runSync = this.useRunSync()
const runFork = this.useRunFork() const runFork = this.useRunFork()
return React.useEffect(() => { React.useEffect(() => {
const scope = runSync(options?.scope const scope = runSync(options?.scope
? Scope.fork(options.scope, options?.finalizerExecutionStrategy ?? ExecutionStrategy.sequential) ? Scope.fork(options.scope, options?.finalizerExecutionStrategy ?? ExecutionStrategy.sequential)
: Scope.make(options?.finalizerExecutionStrategy) : Scope.make(options?.finalizerExecutionStrategy)