Skip to content

Commit 0d5c4fa

Browse files
author
pemrouz
committed
doc: add universal import info
1 parent a561871 commit 0d5c4fa

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

README.md

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,13 @@ export default function component(node, data){ ... }
100100
export default function shop({ stock }){ ... }
101101
```
102102

103-
Declaring the data needed on a component is used to reactively rerender it when the data changes.
103+
Declaring the data needed on a component is used to reactively rerender it when the data changes.
104+
105+
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):
106+
107+
```js
108+
const dependency = await pull('dependency')
109+
```
104110

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

0 commit comments

Comments
 (0)