Check out example codes for "overlayscrollbars-react". It will help you in understanding the concepts better.

Code Example 1

npm install overlayscrollbars-react
npm install overlayscrollbars

// add this line in the Index.tsx file
import 'overlayscrollbars/css/OverlayScrollbars.css';

Code Example 2

npm install overlayscrollbars
npm install overlayscrollbars-react

Code Example 3

npm install overlayscrollbars-react

Learn ReactJs, React Native from akashmittal.com