跳到主要内容

Function style component

It's also can crate react component using function, like:

function CustomComponent({propA, propB}) {
return (
<NativeComponent/>
)
}

And the function defined component can be used with react hooks like (useState, useMemo and etc).