Skip to content

Commit

Permalink
doc: add universal import info
Browse files Browse the repository at this point in the history
  • Loading branch information
pemrouz committed Dec 21, 2016
1 parent a561871 commit 0d5c4fa
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,13 @@ export default function component(node, data){ ... }
export default function shop({ stock }){ ... }
```

Declaring the data needed on a component is used to reactively rerender it when the data changes.
Declaring the data needed on a component is used to reactively rerender it when the data changes.

Alternatively, you can use `ripple.pull` directly to retrieve a resource, which has similar semantics to [dynamic `import()`](https://github.com/tc39/proposal-dynamic-import) (i.e. resolves from local cache or returns a single promise):

```js
const dependency = await pull('dependency')
```

* The other option is to explicitly pass down data to the component from the parent:

Expand Down

0 comments on commit 0d5c4fa

Please sign in to comment.