Skip to content

Commit 06ec0a3

Browse files
authored
Merge pull request #6 from alberto/patch-1
Docs: `view` property expects a component, not a string
2 parents 6381c7c + f7fa96d commit 06ec0a3

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ The `shouldReset` prop can be used to remove any classes and styles from the DOM
8989
`ElementPortal` also accepts an optional `view` prop that takes a component, to be rendered inside the portal:
9090

9191
```js
92-
<ElementPortal id="header" view="CoolHeaderComponent" />
92+
<ElementPortal id="header" view={CoolHeaderComponent} />
9393
```
9494

9595
One advantage of using the `view` prop to specify a component is that any `data-` attributes from the DOM node the portal is rendering to will be passed along to our component as a `data` prop.

0 commit comments

Comments
 (0)