redus 0.2.0
redus: ^0.2.0 copied to clipboard
A Vue-like fine-grained reactivity system for Dart. Developer utilities for convenience and performance.
Changelog #
All notable changes to this project will be documented in this file.
The format is based on Keep a Changelog, and this project adheres to Semantic Versioning.
0.2.0 - 2024-12-19 #
Added #
- Flutter Integration Support
- Exported
ReactiveEffectclass for custom effect creation - Exported
activeEffectandeffectStackfor render tracking - Enables automatic UI reactivity in redus_flutter without manual watchEffect
- Exported
Changed #
- Removed
@internalannotations fromactiveEffectandeffectStack
0.1.0 - 2024-12-18 #
Added #
-
Core Reactivity (
src/reactivity/core/)ref<T>()- Mutable reactive reference with.valueaccessorcomputed<T>()- Lazily evaluated, cached computed valueswritableComputed<T>()- Computed values with custom settersreadonly<T>()- Read-only wrapper preserving reactivitywatchEffect()- Immediate effect with dependency trackingwatchPostEffect()/watchSyncEffect()- Flush timing variantswatch()/watchMultiple()- Explicit source watchingonWatcherCleanup()- Register cleanup in effectsWatchHandlewithstop(),pause(),resume()Schedulerfor batching with pre/post/sync flush modes
-
Utilities (
src/reactivity/utilities/)isRef()- Check if value is Refunref<T>()- Unwrap ref or return valuetoRef<T>()- Normalize value/getter to reftoValue<T>()- Normalize ref/getter to valuetoRefs<T>()- Convert map to refsisProxy()/isReactive()/isReadonly()- Type checking
-
Advanced (
src/reactivity/advanced/)shallowRef<T>()- Shallow reactive ref (no deep tracking)triggerRef()- Force trigger shallow refshallowReadonly<T>()- Shallow readonly wrappercustomRef<T>()- Custom ref with track/trigger controltoRaw<T>()- Get underlying value from reactivemarkRaw<T>()/isMarkedRaw()- Prevent reactivityeffectScope()- Group effects for disposalgetCurrentScope()- Get active effect scopeonScopeDispose()- Register scope cleanup
Package Structure #
Reorganized into three modules:
core/- Core reactive primitives and effectsutilities/- Helper functionsadvanced/- Advanced features