transpose
Maps the element into another one.
Installation
npm install react-beyond @react-beyond/transpose
Usage
import { Beyond } from 'react-beyond'
import { classFor } from '@react-beyond/transpose'
<Beyond features={[transpose()]}>
<App />
</Beyond>
// ...
function Component() {
<Element x-transpose={$ => <Wrapper>{$}</Wrapper>}>
Something
</Element>
}
Options
id
- The id of the feature HOC. Defaults to"transpose"
.
Directives
'x-transpose'?: (self: ReactElement) => ReactElement
- Render function which maps the original element into another one.