Skip to content

Commit

Permalink
Merge 3157da7 into cced63a
Browse files Browse the repository at this point in the history
  • Loading branch information
christianalfoni committed Jun 27, 2017
2 parents cced63a + 3157da7 commit 3371c88
Show file tree
Hide file tree
Showing 19 changed files with 852 additions and 413 deletions.
15 changes: 11 additions & 4 deletions docs/api/components.md
Original file line number Diff line number Diff line change
Expand Up @@ -70,10 +70,16 @@ export default connect({
foo: state`app.foo`,
clicked: signal`app.somethingClicked`
}, (dependencyProps, ownProps, resolve) => {
const path = resolve.path(state`entities.foo.{ownProps}`) // we can resolve values or path here. Note: it's not tracked as dependency

// we can resolve values or path here. Note: it's not tracked as dependency
const path = resolve.path(state`entities.foo.{ownProps}`)

return {
foo: `Label: ${foo}`, // values from state could be transformed here
onClick: (e) => clicked({ id: ownProps.id }) // signals calls could be bound here, so component uses it as general callback
// values from state could be transformed here
foo: `Label: ${foo}`,

// signals calls could be bound here, so component uses it as general callback
onClick: (e) => clicked({ id: ownProps.id })
}
},
function App({foo, onClick}) {
Expand Down Expand Up @@ -251,7 +257,8 @@ you will need to provide one to `connect` for the
component to be given a name in cerebral.

You can call connect in the following ways:
```

```js
connect(dependencies)
connect(dependencies, name)
connect(dependencies, controller)
Expand Down

0 comments on commit 3371c88

Please sign in to comment.