reshow-build
Version:
React super cloneElement and createElement
53 lines (40 loc) • 1.05 kB
Markdown
>
> React cloneElement and createElement alternaive.
>
> To help u build anything.
>
* GIT
* https://github.com/react-atomic/reshow/tree/main/packages/reshow-build
* NPM
* https://www.npmjs.com/package/reshow-build
```js
import build from "reshow-build";
import YourComponent from "./YourComponent";
const Comp = props =>
build(YourComponent)(props, children /* optioninal*/ )
```
```js
import build from "reshow-build";
import YourComponent from "./YourComponent";
const Comp = props =>
build(<YourComponent />)(props, children /* optioninal*/ )
```
```js
import build from "reshow-build";
import YourComponent from "./YourComponent";
const Comp = props =>
build([
<YourComponent />,
YourComponent,
() => <YourComponent />,
'div',
'just string'
])(props, children /* optioninal*/ )
```
[](https://github.com/react-atomic/reshow/tree/main/packages/reshow-build/src/__tests__)