1.0.2 • Published 8 years ago

react-wrap-children v1.0.2

Weekly downloads
1
License
ISC
Repository
-
Last release
8 years ago

Wrap children with props. children can be an array or a single child element. All children receive props. Useful for creating containers. Should work with React and React-Native.

import wrap from "react-wrap-children";

//...
//...

render(){
  return wrap(this.props.children, myProps)
}

myProps can contain a key if you want. If children is an array, and you do not specify a key in your props, a unique key will be created for you.

1.0.2

8 years ago

1.0.1

8 years ago

1.0.0

8 years ago