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

Can't attach ref #25

Open
blackxored opened this issue Jul 14, 2016 · 1 comment
Open

Can't attach ref #25

blackxored opened this issue Jul 14, 2016 · 1 comment

Comments

@blackxored
Copy link

No matter whether i'm using string refs (as in the example) or callback refs (preferred way these days), can't seem to get a ref for the DigitsLoginButton component at all. This prevents me from getting session details. Any help would be appreciated.

@jpdriver
Copy link
Collaborator

hey @blackxored -- sounds like this is probably because after the user logs in, you're switching to rendering the DigitsLogoutButton instead so the ref for DigitsLoginButton won't be being registered anymore.

the getSessionDetails() stuff should really live on the DigitsLogoutButton anyway, since the session data won't actually exist until you've logged in.

i've changed that in my ES6 branch, and confirmed that it works even with ye olde string refs as per the Example.

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