VirtualDOM api differences
Guide that defines some differences that exist between Atomico and React when working with the DOM.
Components as constructors
function Component(){
const [ state, setState ] = useState();
return <host></host>
}
function App(){
return <host>
<Component/>
</host>
}// ⚠️ stateless component
function Component(){
return <host></host>
}
function App(){
return <host>
<Component/>
</host>
}function component(){
return <host></host>
}
const Component = c(component);
customElements.define("my-component",Component)
function app(){
return <host>
<Component/>
</host>
}Event Association
<div>
<button onclick={console.log}>click</button>
<button onMyCustomEvent={console.log}>click</button>
<button onmy-event={console.log}>click</button>
<button onmouseover={console.log}>click</button>
</div>Keyes
dangerouslySetInnerHTML
Last updated
Was this helpful?
