Using a React Native boiler plate with Expo and Redux, we like to use the Amplitude tracking service which involves first initializing with
Amplitude.initialize(apiKey)
followed by logging events in various React Components, such as
Amplitude.logEvent(eventName)
Question: Where in the React Native app structure (especially in the linked boilerplate) will you place the Amplitude.initialize(apiKey)
code?
It works when the code is placed in the componentDidMount
function of the Setup
component in /src/boot/setup.js
, but is that the best place to place it?
Thank you!