Skip to content

Commit

Permalink
cleanup pseudo code
Browse files Browse the repository at this point in the history
  • Loading branch information
BernierMaxence committed Nov 29, 2024
1 parent 7005ac7 commit d646e5e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions _posts/2024-11-22-tvjs-scroll-performance-enhancement.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ To address the first shortcoming of the initial approach, we introduced virtuali
For context, the content of the list is stored in a redux store, normalized: to select a specific item from the store, all you need is its index in the array of items for the corresponding list.

```javascript
const ItemComponent = ({ key, position }) => {
const ItemComponent = ({ position }) => {
const item = useSelector(selectItemByIndex(position));

return <Item {...item} />;
Expand All @@ -50,7 +50,7 @@ const ScrollComponent = () => {

return (
<ItemComponent
key={`${position}`}
key={position}
position={position}
/>
);
Expand Down

0 comments on commit d646e5e

Please sign in to comment.