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

Ref for a single Card #1

Open
botsbuzz opened this issue Feb 17, 2017 · 2 comments
Open

Ref for a single Card #1

botsbuzz opened this issue Feb 17, 2017 · 2 comments

Comments

@botsbuzz
Copy link

Thank you for your project! Very helpful!

I'm a newbie, so i need help: How to add a Ref on each Card?

Could you help me?

Thank you,

Stefano

@hansman
Copy link
Owner

hansman commented Feb 17, 2017

Stefano, glad you like it.

Have a look here and here.

You can use the cardKey property in SwipeCards to define which key to use as reference on each Card.

@botsbuzz
Copy link
Author

@hansman thank you so much for your reply!

How can I use that reference in the code? For example to reference the SwipeCards component I can use:
this.refs.stack

And a single card? For example my need is to get the current card reference. I can get the current key as:
this.refs.stack.getCurrentCard().key;

how to get the relative ref?

Thank you for help and sorry for my bad english and my low knowledge of RN!

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