react-scrollable-feed icon indicating copy to clipboard operation
react-scrollable-feed copied to clipboard

Example in the readme does not work.

Open DBGilles opened this issue 11 months ago • 0 comments

I copied the example in the readme almost exactly and I don't get a scrollable feed. Are there any dependencies that I need?

source code:

import logo from './logo.svg';
import './App.css';
import Button from '@mui/material/Button';
import { useState } from 'react';

import ScrollableFeed from 'react-scrollable-feed'

function App() {
    const items = ['Item 1', 'Item 2', 'Item 2', 'Item 2', 'Item 2', 'Item 2'];
    return (
        <ScrollableFeed>
          {items.map((item, i) => <div key={i}>{item}</div>)}
        </ScrollableFeed>
      );
}

When I inspect in the browser I get this rendered HTML

<div style="max-height: inherit; height: inherit; overflow-y: auto;">
  <div>Item 1</div>
  <div>Item 2</div>
  <div>Item 2</div>
  <div>Item 2</div>
  <div>Item 2</div>
  <div>Item 2</div>
  <div>
  </div>
</div>

Am I missing something?

DBGilles avatar Mar 13 '24 20:03 DBGilles