Version 0.16.0
Pre-release
Pre-release
What's Changed
Breaking Changes
- Renamed functions to more clearly express what they do and make naming conflicts with local variables less likely:
computed()->createComputed()effect()->createEffect()state()->createState()store()->createStore()watch()->createWatcher()andwatcher.off()->watcher.unwatch()
- Changed store events from
CustomEventto light-weight change notifications:store.addEventListener('store-*', handler)->store.on('*', handler)store.removeEventListener('store-*', handler)-> cleanup function returned from.on()handler- Change notification callbacks receive the former details as the only parameter, no more event involved
- Changed parameters of
createComputed()to allow for reducer-like capabilities:- Computed callback now receives old value as first parameter, pushing
AbortSignalfor async callback to second parameter - Optional second parameter for initial value
- Computed callback now receives old value as first parameter, pushing
New Features
- Add reducer-like capabilities to
createComputedfor accumulative computed signals - Basic input validation with more descriptive error messages for all signal types and effects
Tests
- Updated test cases to reflect API changes
- Tests covering accumulative computed signals, more edge cases and input validation
Documentation
- Updated
READMEto document accumulative computed signals and reflect API changes - New AI-targeted documentation files:
.ai-context.md.cursorrulesCLAUDE.md.github/copilot-instructions.md
Full Changelog: v0.15.2...v0.16.0