React-id-swiper: How to get ref on version 2.1.0

Created on 19 Mar 2019  路  5Comments  路  Source: kidjp85/react-id-swiper

I'm struggling to do the same that you suggested here https://github.com/kidjp85/react-id-swiper/issues/241 in order to get the ref.

I want to access the activeIndex property.

Any suggestion?

Most helpful comment

From 2.0.0 , react-id-swiper is no longer using ReactComponent. It was rewritten with FunctionComponent to use hooks api, therefore you can't get ref . Instead, there is new prop name getSwiper to get Swiper instance incase you need to manipulate swiper outside of Swiper component. You can find live demo here

All 5 comments

From 2.0.0 , react-id-swiper is no longer using ReactComponent. It was rewritten with FunctionComponent to use hooks api, therefore you can't get ref . Instead, there is new prop name getSwiper to get Swiper instance incase you need to manipulate swiper outside of Swiper component. You can find live demo here

Thanks for the fast reply!!

Hello! I'm interested in seeing an example, but the link doesn't seem to include code relevant to this question.

Hello! I'm interested in seeing an example, but the link doesn't seem to include code relevant to this question.

I think @kidjp85 means this example.

Hello! I'm interested in seeing an example, but the link doesn't seem to include code relevant to this question.

I think @kidjp85 means this example.

This is the same story. Need an example of getSwiper props.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

spostad7 picture spostad7  路  6Comments

mehrdad517 picture mehrdad517  路  4Comments

Sallywa picture Sallywa  路  5Comments

Alexandrdrdr picture Alexandrdrdr  路  3Comments

mbenjrinija picture mbenjrinija  路  4Comments