Skip to content

How to use plugins in React with TypeScript? #584

Answered by KingSora
krutoo asked this question in Q&A
Discussion options

You must be logged in to vote

@krutoo Plugins are registered globally, so you don't have to add them per instance.

In your entry file (where you mount your root react component) you can do:

import { OverlayScrollbars, ClickScrollPlugin } from 'overlayscrollbars';

 OverlayScrollbars.plugin(ClickScrollPlugin);

If you want clickScroll to work in your instance, you have to specify the corresponding option to true:

<OverlayScrollbarsComponent options={{ scrollbars: { clickScroll: true } }}>
</OverlayScrollbarsComponent>

Replies: 1 comment 3 replies

Comment options

You must be logged in to vote
3 replies
@krutoo
Comment options

@cojoclaudiu
Comment options

@KingSora
Comment options

Answer selected by krutoo
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants