Skip to content

Commit

Permalink
add documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
samio committed Mar 29, 2019
1 parent e44d8f1 commit 008084b
Showing 1 changed file with 21 additions and 21 deletions.
42 changes: 21 additions & 21 deletions website/src/pages/docs/api-loadable-server.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -58,9 +58,9 @@ const app = <App />

Get scripts as a string of `<script>` tags.

| Arguments | Description |
| ------------ | ----------------------------------------- |
| `attributes` | Optional attributes added to script tags. |
| Arguments | Description |
| ------------------------ | ----------------------------------------------------------------------------------------------------------- |
| `attributes` or `attrFn` | Optional attributes added to script tags, or a function that receives a `chunk` and returns the attributes. |

```js
const body = `<body><div id="root">${html}</div>${chunkExtractor.getScriptTags()}</body>`
Expand All @@ -70,9 +70,9 @@ const body = `<body><div id="root">${html}</div>${chunkExtractor.getScriptTags()

Get scripts as an array of React `<script>` elements.

| Arguments | Description |
| ------------ | --------------------------------------------- |
| `attributes` | Optional attributes added to script elements. |
| Arguments | Description |
| ------------------------ | --------------------------------------------------------------------------------------------------------------- |
| `attributes` or `attrFn` | Optional attributes added to script elements, or a function that receives a `chunk` and returns the attributes. |

```js
const body = renderToString(
Expand All @@ -87,9 +87,9 @@ const body = renderToString(

Get "prefetch" and "preload" links as a string of `<link>` tags.

| Arguments | Description |
| ------------ | --------------------------------------- |
| `attributes` | Optional attributes added to link tags. |
| Arguments | Description |
| ------------------------ | --------------------------------------------------------------------------------------------------------- |
| `attributes` or `attrFn` | Optional attributes added to link tags, or a function that receives a `chunk` and returns the attributes. |

```js
const head = `<head>${chunkExtractor.getLinkTags()}</head>`
Expand All @@ -99,9 +99,9 @@ const head = `<head>${chunkExtractor.getLinkTags()}</head>`

Get "prefetch" and "preload" links as an array of React `<link>` elements.

| Arguments | Description |
| ------------ | ------------------------------------------- |
| `attributes` | Optional attributes added to link elements. |
| Arguments | Description |
| ------------------------ | ------------------------------------------------------------------------------------------------------------- |
| `attributes` or `attrFn` | Optional attributes added to link elements, or a function that receives a `chunk` and returns the attributes. |

```js
const head = renderToString(<head>{chunkExtractor.getLinkElements()}</head>)
Expand All @@ -111,9 +111,9 @@ const head = renderToString(<head>{chunkExtractor.getLinkElements()}</head>)

Get style links as a string of `<link>` tags.

| Arguments | Description |
| ------------ | ---------------------------------------- |
| `attributes` | Optional attributes added to style tags. |
| Arguments | Description |
| ------------------------ | ---------------------------------------------------------------------------------------------------------- |
| `attributes` or `attrFn` | Optional attributes added to style tags, or a function that receives a `chunk` and returns the attributes. |

```js
const head = `<head>${chunkExtractor.getStyleTags()}</head>`
Expand All @@ -131,9 +131,9 @@ const head = renderToString(<head>{chunkExtractor.getStyleElements()}</head>)

Get inline style links as a string of `<link>` tags (returns a promise).

| Arguments | Description |
| ------------ | ---------------------------------------- |
| `attributes` | Optional attributes added to style tags. |
| Arguments | Description |
| ------------------------ | ---------------------------------------------------------------------------------------------------------- |
| `attributes` or `attrFn` | Optional attributes added to style tags, or a function that receives a `chunk` and returns the attributes. |

```js
chunkExtractor.getInlineStyleTags()
Expand All @@ -146,9 +146,9 @@ chunkExtractor.getInlineStyleTags()
Get inline style links as an array of React `<link>` elements (returns a promise).
| Arguments | Description |
| ------------ | -------------------------------------------- |
| `attributes` | Optional attributes added to style elements. |
| Arguments | Description |
| ------------------------ | -------------------------------------------------------------------------------------------------------------- |
| `attributes` or `attrFn` | Optional attributes added to style elements, or a function that receives a `chunk` and returns the attributes. |
```js
chunkExtractor.getInlineStyleElements()
Expand Down

0 comments on commit 008084b

Please sign in to comment.