Skip to content

Commit f7fa96d

Browse files
authored
Docs: view property expects a component, not a string
1 parent 6381c7c commit f7fa96d

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)