segmentio / analytics-react-native

The hassle-free way to add analytics to your React-Native app.
https://segment.com/docs/sources/mobile/react-native/
MIT License
360 stars 185 forks source link

fix: removes Inject plugins #837

Closed oscb closed 1 year ago

oscb commented 1 year ago

Adding and storing context and userInfo is now completely handled in the client, outside of the timeline.

This is to prevent concurrency issues in the timeline where plugins could hold off updating the userInfo, or direct operations like reset could cause an processing event to contain information not representative from the sequential order when it was captured.

applyRawEventData now is the capture moment before timeline/plugin processing starts, capturing all the data relevant to the event at a single moment.

This is the first step towards completely removing shared state.

oscb commented 1 year ago

:tada: This PR is included in version @segment/analytics-react-native-v2.15.0 :tada:

The release is available on:

Your semantic-release bot :package::rocket: