Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
melloware authored Jul 12, 2024
1 parent d73b62b commit 21d5c0c
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -82,18 +82,23 @@ If you are going to be requesting a streaming or chunked response, use the `<Laz
The `ScrollFollow` component accepts a render prop function which should return a component to render based on the
function's arguments.

> [!NOTE]
> ScrollFollow must be wrapped in an element that contains a fixed height such as a `<div>`
```jsx
import React from "react";
import { render } from "react-dom";
import { LazyLog, ScrollFollow } from "@melloware/react-logviewer";

render(
<div style={{ height: 500, width: 902 }}>
<ScrollFollow
startFollowing={true}
render={({ follow, onScroll }) => (
<LazyLog url="http://example.log" stream follow={follow} onScroll={onScroll} />
)}
/>,
/>
</div>,
document.getElementById("root"),
);
```
Expand Down

0 comments on commit 21d5c0c

Please sign in to comment.