Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Accessing to ref #512

Open
Edgar200021 opened this issue Feb 1, 2024 · 1 comment
Open

Accessing to ref #512

Edgar200021 opened this issue Feb 1, 2024 · 1 comment

Comments

@Edgar200021
Copy link

Edgar200021 commented Feb 1, 2024

How can I access ref ? I need to put a mouseenter event handler on the button, but I can't because I don't have access to ref

@stoyanov-kaloyan
Copy link

You can achieve this by using the useRef hook as in this example:

const pageRef = useRef(null);

return (
	<ReactPaginate
	ref={pageRef}
	pageCount={pageCount}
	/>)

Here is the reack useRef documentation

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants