This project compares adding multiple events to the same HTML element in both Vue and Solid using multiple components. Projects are intended to be as equivalent as possible.
In Vue, you can add events to the same HTML element from multiple components. However in Solid, events are overridden unless the root of component is an HTML element (multiple events cannot be added to multiple components using the same HTML element).
- Install dependencies:
pnpm install - Start both Vue/Solid projects:
pnpm dev(two browser tabs will be opened) - Open developer tools to see
console.logs - Toggle
useDivAsComponentin Solid anduseDivAsComponentin Vue to see differences in behavior.