Releases: bikeshaving/crank
Releases · bikeshaving/crank
Crank 0.7.0
Crank 0.7.0
A major release featuring a redesigned async architecture and several new capabilities.
New Features
refresh()callbacks - Pass a callback torefresh()to update state:this.refresh(() => count++)- Async system overhaul - Two-pass rendering architecture eliminates tearing and enables parallel hydration
- Racing component state preservation - Components that win races keep their DOM and state intact
@b9g/crank/asyncmodule - New public module with<lazy>,<Suspense>, and<SuspenseList>components- Async unmounting - Components can perform exit animations via async
cleanup()callbacks - Enhanced copy/hydrate props - String syntax for fine-grained control:
copy="\!value",hydrate="class id" - Class object syntax - Use objects for class names:
class={{active: true, disabled: false}} - New
<Text>element - Explicit text node creation and improved text rendering - Cooperative DOM rendering - Preserves third-party DOM nodes, safe to render to document.body
Breaking Changes
flush()renamed toafter()(with deprecation warnings for backward compatibility)- Async generator components in
for await...ofloops always return promises - Async generators without props loops now behave like sync generators
Bug Fixes
- Improved error handling for async generator components
- Better handling of unhandled promise rejections
Full changelog: https://github.com/bikeshaving/crank/blob/main/CHANGELOG.md#070---2025-08-14
Install: npm install @b9g/[email protected]