analytics-react-native icon indicating copy to clipboard operation
analytics-react-native copied to clipboard

[QUESTION] Why using analytics-react-native instead of analytics-node ?

Open louisiscoding opened this issue 7 years ago • 2 comments

I quote :

A React Native client for Segment. The hassle-free way to integrate analytics into any application.

This library is based on its node counterpart, analytics-node. Despite being designed to run on react-native, it will also work in browsers (via webpack or browserify) and even in nodejs. You only need to include fetch for browsers or node-fetch for nodejs or io.js.

analytics-react-native is a library used to implement Segment API to react-native project. But what does it bring to my react-native project that analytics-node doesn't. Can i possibly use analytics-node for my react-native project ?

louisiscoding avatar Nov 28 '17 10:11 louisiscoding

Hey @LouisJS - Scott from Segment here! We do have a number of clients that just use a browserfied version of analytics-node, and that's totally fine. I think this library does make things a little bit easier, but note that it isn't officially supported by Segment (althought it's great!).

Cheers

scotty0 avatar Nov 29 '17 10:11 scotty0

hello! This package solve some issues I found on analytics-node package, for example, it don't require crypto wich don't work on react-native and you need to use something like react-native-crypto, I think there's other issues with another dependency but I can't remember what. If you try it, please tell us if you found any other problem. Also analytics-react-native implements a screen method wich is useful for mobile apps.

neiker avatar Nov 29 '17 19:11 neiker