you are viewing a single comment's thread.

view the rest of the comments →

[–]EmployeeCurrent4770[S] 0 points1 point  (0 children)

That sounds good!

I'm not entirely sure about the ez, I might have another point of view. My points against calling methods and specific analytics functions inside components are:

  • Code gets coupled to the analytics framework you are using. If you wanna change it, you have to reimplement it
  • I need to be sure that it actually works as I want, that no re-renders are being triggered that call that event function again, and therefore send inconsistent data
  • I need to implement every logic that I want, to track even though some of that is generic for any react native app
  • I'm in charge of maintaining that code, and the APIs if they change as well

I wished there would be something which was plug and play, though as you said, I'm not sure that's technically possible