reshow-build
TypeScript icon, indicating that this package has built-in type declarations

1.0.1 • Public • Published

Reshow Build

React cloneElement and createElement alternaive.

To help u build anything.

Usage

Build without instance

import build from "reshow-build";
import YourComponent from "./YourComponent";

const Comp = props => 
 build(YourComponent)(props, children /* optioninal*/ )

Build with instance

import build from "reshow-build";
import YourComponent from "./YourComponent";

const Comp = props => 
 build(<YourComponent />)(props, children /* optioninal*/ )

Build with array

import build from "reshow-build";
import YourComponent from "./YourComponent";

const Comp = props => 
 build([
    <YourComponent />,
    YourComponent,
    () => <YourComponent />,
    'div',
    'just string'
 ])(props, children /* optioninal*/ )

More examples

Examples

Package Sidebar

Install

npm i reshow-build

Weekly Downloads

639

Version

1.0.1

License

ISC

Unpacked Size

35.4 kB

Total Files

14

Last publish

Collaborators

  • hillliu