-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
Feature req: Expo support for React Native library #1174
Comments
Thanks for creating this issue! Expo support would be awesome @mariusandra Any idea what would be required to do this? |
Hi @timgl - We should totally do this, yet it's a non-trivial amount of work to get a RN library that's at parity with the current native client libraries with regards to autocapture. The native libraries provide us with a stream of tap and screenview events, which we won't be able to get with RN alone. Heap had to do quite a bit of innovative engineering to add this support. We could do something similar though. I'm pretty comfortable with AST trees by now :). Alternatively, it should be possible to use the existing posthog-node library to manually capture events... and with a bit of tinkering the upcoming posthog-js-lite library should also work. However those will not give the autocapture or feature flag options. |
Hi just wanted to add a vote on this req. Would be really useful for us to have Expo integration, trying the posthog-node lib on expo but obviously this misses some really great features like auto-capture. Also FYI, papercups got a fair few requests for expo integration https://news.ycombinator.com/item?id=24226979 and prioritised it pretty quick https://news.ycombinator.com/item?id=24226979. Expo is attractive for smaller teams wanting to avoid codebase fragmentation. On the assumption that posthog appeals to a similar base it would be a win. |
Hey @adjwills , thanks for the vote! I think we don't have enough bandwidth to squeeze this into the current sprint/release, as it's quite a bit of work to get done, especially for autocapture (see what heap had to do to get this working), but we'll definitely take note of this! |
Hey @mariusandra , thanks for the response! Totally understand that this is a fair bit of work, it will certainly be really useful to us if/when it's available. For now we'll look at a more minimal implementation with the existing posthog-node library, that looks like the best route to me. Assuming that works well we'd be keen to capture more value from the autocapture features etc. (I've tested all those with a react-js web build and am super impressed with what you guys have built!) |
+1 from user request. |
+1 for Expo support with autocapture/session-recordings from my team's side as well. |
+1 for Expo support |
+1 For Expo support |
+1 for Expo support |
2 similar comments
+1 for Expo support |
+1 for Expo support |
Looks like we have some interest thing @yakkomajuri |
FYI for others: we got it working in Expo for the time being by creating two of our own server endpoint (in ruby). Our expo client hits our endpoint to get a distinct key, the front-end saves this. Then each time we want to log an event, we hit our own API endpoint. Our server uses the Ruby PostHog client and creates a PostHog event using this server-side system. It was about 20 lines of code total. Not the most elegant but it got things working! |
+1 for Expo support |
Expo support would be huge. |
+1 for Expo support |
@paolodamico would we have this anytime soon? +1 for expo support! |
YES! We're actively working on it: PostHog/posthog-js-lite#4 |
Ooh I didn't see this issue 😅 I am indeed hot on the heels of this issue and will be looking for testers shortly. Stay tuned... I'll post here once we have something on npm for testing 💪 |
For anybody who is subscribed to this issue - it's here!
Now that this is fully JS (well, Typescript) based it is easier than ever for us to improve things and iterate so speak up if there's something missing! Check out the docs for more info 🙌 |
Amazing news @benjackwhite! Guess we can close this now 🎊 |
**Is your feature request related to a problem? The React Native library cannot run on Expo's stand-alone apps because as mentioned here, managed apps cannot link native dependencies.
Describe the solution you'd like Direct integration via the Expo SDK.
Describe alternatives you've considered Doing a manual integration via the API, but it would take too much time and most of the benefits of the capturing library would be lost.
Additional context Building with Expo is a very convenient way to deploy native apps, I would imagine a number of apps run on their managed workflow.
Thank you for your feature request - we love each and every one!
The text was updated successfully, but these errors were encountered: