diff --git a/README.md b/README.md index 1650e3b..899f1ff 100644 --- a/README.md +++ b/README.md @@ -25,27 +25,22 @@ Install as project dependency: $ yarn add react-adopt ``` -Then you can use the method to compose your components +Then you can use the method to compose your components. See above an example using the awesome library [react-powerplug](https://github.com/renatorib/react-powerplug): ```js import React from 'react' -import { render } from 'react-dom' import { adopt } from 'react-adopt' - -import { Filter } from './my-awesome-filter-component' +import { Value } from 'react-powerplug' const Composed = adopt({ - kids: p.age < 18} />, - adults: p.age >= 18} /> + greet: , + name: , }) const App = () => ( - {({ kids, adults }) => ( -
-
    {kids.map(p =>
  • {p.name}
  • )}
-
    {adults.map(p =>
  • {p.name}
  • )}
-
+ {({ greet, name }) => ( +
{greet.value} {name.value}
)}
)