Component assist the creation of dynamic, untracked components. It takes a component and its props, then returns a function where you can pass additional props to override the initially defined ones.
name type description component fn/Element/tagName/object with toString method component to create [props] object component props
import { render , Component } from ' pota ' function App ( ) { const Element = Component ( ' marquee ' , { children : ' hello world ' , ' style:color ' : ' aqua ' } ) return ( < main > < Element /> < Element > bye world </ Element > < Element style : color = " lime " /> </ main > ) } render ( App )
Component with default props that change import { render , Component } from ' pota ' function App ( ) { const Fun = Component ( ' marquee ' ) return ( < main > < Fun style : color = " aqua " > Hi thereeeeeeeee :) </ Fun > < Fun style : color = " aquamarine " > Im bender from future </ Fun > </ main > ) } render ( App )
props argument may be omitted