Overview
Logo Soup’s core engine is framework-agnostic. All framework adapters are thin wrappers (~30-80 lines) that bridge the engine’ssubscribe / getSnapshot interface into a framework’s reactivity model.
If your framework isn’t supported yet, you can easily build your own adapter.
Core Engine Interface
Every adapter works with the same core engine:Engine API
Adapter Pattern
All adapters follow this pattern:- Create the engine (once per component instance)
- Subscribe to state changes
- Update reactive state when engine emits
- Watch reactive inputs and call
engine.process()when they change - Cleanup on component unmount
Examples by Framework
- React
- Vue
- Svelte 5
- Solid
- Angular
- Preact Signals
React uses
useSyncExternalStore for external subscriptions:Key Considerations
1. State Synchronization
The engine emits on every state change. Your adapter should update the framework’s reactive state:2. Reactive Processing
Watch for input changes and re-trigger processing:3. Cleanup
Always clean up on unmount:4. Referential Stability
The snapshot reference only changes when values actually change. This is important for performance:Testing Your Adapter
Test these scenarios:- Initial load — Process logos on mount
- State updates — Verify reactive state changes
- Input changes — Re-process when options change
- Error handling — Handle failed image loads
- Cleanup — No memory leaks on unmount
- Concurrent updates — Cancel previous processing when inputs change
TypeScript
Import types from the core package:See Also
- Vanilla JS - Using the core engine directly
- API Reference - Complete options reference
- Source Code - View existing adapters