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

Simplify currentUser syntax #709

Closed
orodio opened this issue Jul 7, 2021 · 1 comment
Closed

Simplify currentUser syntax #709

orodio opened this issue Jul 7, 2021 · 1 comment
Assignees

Comments

@orodio
Copy link
Contributor

orodio commented Jul 7, 2021

fcl.currentUser being a function confuses people, they are expecting it to be an instance of a class or object.

We should be able to simplify the syntax so that the following is true:

import {currentUser} from "@onflow/fcl"

// before
currentUser().subscribe(callback)
// after
currentUser.subscribe(callback)

// before
currentUser().snapshot()
// after
currentUser.snapshot()

// before
currentUser().authenticate
// after
currentUser.authenticate

// before
currentUser().authorization
// after
currentUser.authorization

// before
currentUser().asArg
// after
currentUser.asArg
@chasefleming
Copy link
Member

Addressed in #796

@chasefleming chasefleming self-assigned this Sep 21, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants