nytimes / react-tracking

๐ŸŽฏ Declarative tracking for React apps.
https://open.nytimes.com/introducing-react-tracking-declarative-tracking-for-react-apps-2c76706bb79a
Other
1.88k stars 123 forks source link

Export ReactTrackingContext #123

Closed damassi closed 5 years ago

damassi commented 5 years ago

We're currently exploring some different hooks patterns involving react-tracking but noticed that ReactTrackingContext isn't exported from the main index, requiring us to dig in like so:

import { ReactTrackingContext } from "react-tracking/build/withTrackingComponentDecorator"

This moves things up to the main index file.

tizmagik commented 5 years ago

Thanks, makes sense! Mind also adding a test to cover this change?

Would also love to hear about your hooks exploration, thatโ€™s great! ๐Ÿ™Œ

damassi commented 5 years ago

@tizmagik - I was actually just about to close this PR and open one with a hooks implementation ๐Ÿ˜„