The codebase has successfully consolidated to a single MotionDiv implementation. All previous claims about multiple working components were incorrect. There is now one component with multiple aliases for different use cases.
// From crates/leptos-motion-dom/src/lib.rs lines 94-96
// ONE implementation, multiple names:
pub use event_driven_motion_div::EventDrivenMotionDiv as MotionDiv;
pub use event_driven_motion_div::EventDrivenMotionDiv as ReactiveMotionDiv;
pub use event_driven_motion_div::EventDrivenMotionDiv as DragMotionDiv;Reality: EventDrivenMotionDiv is the only component that exists.
- SimpleMotionDiv exists ❌ - REMOVED (see lib.rs line 24: "SimpleMotionDiv removed")
- MinimalMotionDiv exists ❌ - Tests exist, no implementation
- Multiple working components ❌ - Only one component exists
- CSS-only fallback available ❌ - No separate CSS component
// Found in event_driven_motion_div.rs:464
std::time::SystemTime::now().duration_since(std::time::UNIX_EPOCH).unwrap()- Impact: Blocks all WASM usage
- Fix Required: Replace with
js_sys::Date::now()
let mut manager = animation_manager.borrow_mut(); // Multiple borrows = panic- Impact: Runtime panics during animations
- Fix Required: Redesign state management
| Component Name | Implementation | Status |
|---|---|---|
MotionDiv |
EventDrivenMotionDiv | ✅ Alias |
ReactiveMotionDiv |
EventDrivenMotionDiv | ✅ Alias |
DragMotionDiv |
EventDrivenMotionDiv | ✅ Alias |
EventDrivenMotionDiv |
EventDrivenMotionDiv | ✅ Original |
SimpleMotionDiv |
REMOVED | ❌ Does not exist |
MinimalMotionDiv |
NEVER IMPLEMENTED | ❌ Does not exist |
Many files reference non-existent components:
examples/simple-animation-demo/src/simple_demo.rs:6importsSimpleMotionDiv❌demos/showcase/comprehensive-demo/src/minimal_motion_test.rs:3importsMinimalMotionDiv❌demos/csr-demo/src/main.rsreferencesSimpleMotionDiv❌demos/ssr-demo/src/lib.rsreferencesSimpleMotionDiv❌
Fix: Replace all with MotionDiv (the actual component).
| Issue | Status | Priority | Fix Required |
|---|---|---|---|
| WASM time system | ❌ BLOCKS WASM | 🚨 Critical | Replace SystemTime |
| RefCell borrowing | ❌ RUNTIME PANICS | 🔴 High | Redesign state mgmt |
| Broken demos/examples | ❌ IMPORT ERRORS | 🔴 High | Update imports |
| Missing components | ❌ BUILD FAILURES | 🔴 High | Remove references |
// ❌ WRONG (from previous analysis)
use leptos_motion_dom::SimpleMotionDiv; // Doesn't exist!
// ✅ CORRECT (but has WASM issues)
use leptos_motion_dom::MotionDiv; // Only component, but broken in WASM- Only one component exists:
MotionDiv(EventDrivenMotionDiv) - WASM compatibility: ❌ Broken (SystemTime panics)
- Production ready: ❌ No (RefCell borrowing issues)
-
Fix broken imports across codebase
- Replace
SimpleMotionDiv→MotionDiv - Replace
MinimalMotionDiv→MotionDiv - Update all examples and demos
- Replace
-
Fix WASM compatibility
// Replace all instances of: std::time::SystemTime::now() // With: js_sys::Date::now()
-
Fix RefCell borrowing
- Add proper borrow guards
- Redesign animation manager
- URGENT: Fix broken imports in examples/demos
- CRITICAL: Fix WASM SystemTime usage
- HIGH: Fix RefCell borrowing patterns
- MEDIUM: Update all documentation
- Use
MotionDiv(the only component) - Avoid WASM until SystemTime is fixed
- Expect runtime panics until RefCell is fixed
- Monitor for fixes before production use
Previous analysis was completely wrong. The reality is:
- ✅ Successfully consolidated to single component
- ❌ But that component has critical WASM/borrowing bugs
- ❌ Examples/demos broken due to referencing removed components
- ❌ Not production ready until core issues fixed
Bottom Line: Architecture consolidation succeeded, but the single component needs critical bug fixes before it's usable.