Skip to content

Commit ff4f13d

Browse files
committed
update README
1 parent bc5ecca commit ff4f13d

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

README.md

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,13 +62,20 @@ Your row component receives the following props:
6262
- `...rowProps` - Any additional props you passed to the ReactSmartScroll component will be available on every row.
6363

6464
## How It Works
65-
ReactSmartscroll renders enough rows to fill the visible space of the scroll area, plus an extra one above and below. It measures the height of each of the visible row and caches that height as you scroll (or resize) so that the next render of the same row is more efficient. It simulates the total height of all the items by adjusting the padding top and bottom of the div that contains the rows as you scroll.
65+
ReactSmartScroll renders enough rows to fill the visible space of the scroll area, plus an extra one above and below. It measures the height of each of the visible row and caches that height as you scroll (or resize) so that the next render of the same row is more efficient. It simulates the total height of all the items by adjusting the padding top and bottom of the div that contains the rows as you scroll.
6666

6767
Unlike other virtual scrolling components/libraries out there, there are no unnecessary wrapper divs for your rows, it doesn't use absolute positioning, and doesn't require any polyfills.
6868

6969
#### Firefox Note
7070
The latest version of Firefox doesn't seem to keep up with React's rendering speed with `useLayoutEffect()` or `useEffect()`, so if you grab the scrollbar and scroll up and down really fast, you'll see blank space momentarily. Other browsers don't appear to have this problem. Using the mouse wheel to scroll looks good in all browsers.
7171

72+
### rowRef Note
73+
>Why does React Smart Scroll pass `rowRef` instead of just passing `ref`?
74+
75+
This removes the burden of having to wrap functional row components with `React.forwardRef()`.
76+
77+
IMO, it's easier and more flexible for you to use `rowRef`.
78+
7279
## Closing Note
7380
I hope you enjoy using this component as much as I enjoyed making it!
7481

0 commit comments

Comments
 (0)