Search code examples
javascriptreactjstypescripthorizontal-scrolling

React horizontal Scrolling Menu?


I am building a nextjs application. In my project I am not using TypeScript. I am using Javascript. I need a horizontal scroll on mouse wheel and also on touch. I haven't find any react packages. But I find one react package - react-horizontal-scrolling-menu. I see all demo. It perfect for my project. But I am facing one problem. Al of it's example create in TypeScript. But I am not using typeScript. If I copy the code, Then I get many error?

https://codesandbox.io/s/no-scrollbar-and-buttons-position-c3kn5?file=/src/index.tsx

In this situation, What I have to do. I am not understanding?

Please can anyone help me. I am facing this issue over 10 days. Please do not dislike or close my questions.


Solution

  • Converted to JavaScript. You only needed to remove types and change tsx, ts to jsx, js.

    https://codesandbox.io/s/no-scrollbar-and-buttons-on-bottom-forked-m2wci