Skip to content

Commit e965a64

Browse files
committed
A convenience function.
1 parent a117915 commit e965a64

File tree

2 files changed

+10
-4
lines changed

2 files changed

+10
-4
lines changed

Analytics.js

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,16 @@
11
/**
2-
* @providesModule Answers
2+
* @providesModule Analytics
33
*/
44
'use strict';
55

6-
var { NativeModules, Platform } = require('react-native');
6+
var { NativeModules } = require('react-native');
77
var FBAnalytics = NativeModules.FBAnalytics;
88

9-
module.exports = FBAnalytics;
9+
function setUserProperties(properties) {
10+
Object.keys(properties).forEach((key) => {
11+
FBAnalytics.setUserProperty(key, properties[key]);
12+
});
13+
}
14+
15+
module.exports = {...FBAnalytics, setUserProperties};
1016

RemoteConfig.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
*/
44
'use strict';
55

6-
var { NativeModules, Platform } = require('react-native');
6+
var { NativeModules } = require('react-native');
77
var FBRemoteConfig = NativeModules.FBRemoteConfig;
88

99
module.exports = FBRemoteConfig;

0 commit comments

Comments
 (0)