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

React Hooks API? #120

Closed
alloy opened this issue Apr 9, 2019 · 1 comment · Fixed by #124
Closed

React Hooks API? #120

alloy opened this issue Apr 9, 2019 · 1 comment · Fixed by #124

Comments

@alloy
Copy link

alloy commented Apr 9, 2019

Given that React Hooks are now here to stay and more and more people are eager to use them, I was wondering if you have started thinking about a future version of react-tracking that would integrate well with this new landscape?

Specifically, we can’t add decorators to functions and I’d really like to keep separating business logic from inline analytics calls–while keeping them clearly ‘attached’ to it.

@tizmagik
Copy link
Collaborator

Yea I’ve been thinking about how best to approach this. The ideal interface I think would be something like useTracking() which could encapsulate the context propagation and everything else we support today with the decorator syntax.

I haven’t had time to create a POC/start a PR, but if anyone’s interested, please feel free and we can iterate.

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

Successfully merging a pull request may close this issue.

2 participants