Skip to content

Is it possible to add plugin for react hook version of OS? #633

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

You must be logged in to vote

Good day @Enkratia :)

Adding plugins is not something thats specific to any framework. Plugins are global and should not be added in a component, instead they should be added in your entry point or somewhere in the global scope. You can add plugins like this:

import { OverlayScrollbars } from 'overlayscrollbars';

OverlayScrollbars.plugin(MyPlugin); 

The react hook has the possibility to attach OverlayScrollbars to any element. You can find an example of this in the README of the react version: https://github.com/KingSora/OverlayScrollbars/tree/master/packages/overlayscrollbars-react#hook

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@Enkratia
Comment options

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

This discussion was converted from issue #632 on April 30, 2024 11:32.