Anterrabetta.js
: Automatically maps specific state branches to persistent storage with versioned "genotypes," allowing instant rollbacks to previous application "lives."
: Intelligently prunes unused state properties based on "caloric" usage (frequency and timing of access), preventing memory leaks in long-running SPAs. anterrabetta.js
import { createOrganism } from 'anterrabetta'; const userProfile = createOrganism({ name: 'SessionUser', traits: { username: 'Guest', theme: 'dark', level: 1 }, // Feature: Persistence with versioning lineage: { storage: 'indexedDB', version: '2.1.0' }, // Feature: Automatic pruning of unused nodes metabolism: 'efficient' }); // Components "host" the organism function Dashboard() { const [user, evolve] = userProfile.useSymbiosis(); return ( evolve({ level: user.level + 1 })}> Level Up: {user.level} ); } Use code with caution. Copied to clipboard 🚀 Why This Matters : Automatically maps specific state branches to persistent
Bio-State Sync is an that treats your application state like a living organism. It moves away from manual localStorage hooks or Redux sagas, instead using an "evolutionary" approach to state management. Key Capabilities It moves away from manual localStorage hooks or
: State is restored before the first paint using the persistent DNA.
💡 Use the .hibernate() method to freeze your entire app state into a single encrypted "seed" that can be emailed or shared to perfectly replicate a user's session for debugging.