Skip to content

Commit ad50bbd

Browse files
committed
fix docs
1 parent 91a2bbf commit ad50bbd

File tree

2 files changed

+4
-13
lines changed

2 files changed

+4
-13
lines changed

MixpanelDemo/screens/ProfileScreen.js

Lines changed: 2 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -37,10 +37,6 @@ export default class ProfileScreen extends React.Component {
3737
this.mixpanel.getPeople().unset("a");
3838
}
3939

40-
incrementProperties = () => {
41-
this.mixpanel.getPeople().increment({"a": 1.2, "b": 3});
42-
}
43-
4440
incrementProperty = () => {
4541
this.mixpanel.getPeople().increment("a", 1.2);
4642
}
@@ -54,7 +50,7 @@ export default class ProfileScreen extends React.Component {
5450
}
5551

5652
unionProperties = () => {
57-
this.mixpanel.getPeople().union({"a": ["goodbye", "hi"], "c": ["hello"]});
53+
this.mixpanel.getPeople().union("a", ["goodbye", "hi"]);
5854
}
5955

6056
trackChargeWithoutProperties = () => {
@@ -113,11 +109,6 @@ export default class ProfileScreen extends React.Component {
113109
<Text style={styles.buttonText}>Unset Properties</Text>
114110
</TouchableOpacity>
115111
</View>
116-
<View style={{ flexDirection: 'row', justifyContent: 'space-between' }}>
117-
<TouchableOpacity style={styles.button} onPress={this.incrementProperties}>
118-
<Text style={styles.buttonText}>Increment Properties</Text>
119-
</TouchableOpacity>
120-
</View>
121112
<View style={{ flexDirection: 'row', justifyContent: 'space-between' }}>
122113
<TouchableOpacity style={styles.button} onPress={this.incrementProperty}>
123114
<Text style={styles.buttonText}>Increment Property</Text>
@@ -134,7 +125,7 @@ export default class ProfileScreen extends React.Component {
134125
</TouchableOpacity>
135126
</View>
136127
<View style={{ flexDirection: 'row', justifyContent: 'space-between' }}>
137-
<TouchableOpacity style={styles.button} onPress={this.identify}>
128+
<TouchableOpacity style={styles.button} onPress={this.unionProperties}>
138129
<Text style={styles.buttonText}>Union Properties</Text>
139130
</TouchableOpacity>
140131
</View>

index.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -519,7 +519,7 @@ export class People {
519519
* provide a negative number for the value.
520520
*
521521
* @param {string} prop the People Analytics property that should have its value changed
522-
* @param {string} by the amount to be added to the current value of the named property
522+
* @param {number} by the amount to be added to the current value of the named property
523523
*
524524
*/
525525
increment(prop, by) {
@@ -575,7 +575,7 @@ export class People {
575575
* If the property exists and is not list-valued, the union will be ignored.
576576
*
577577
* @param {string} name name of the list-valued property to set or modify
578-
* @param {string} value an array of values to add to the property value if not already present
578+
* @param {array} value an array of values to add to the property value if not already present
579579
*/
580580
union(name, value) {
581581
if (!StringHelper.isValid(name)) {

0 commit comments

Comments
 (0)