Skip to content

Commit 080daa6

Browse files
fix bug
1 parent 60a76a7 commit 080daa6

File tree

1 file changed

+13
-4
lines changed

1 file changed

+13
-4
lines changed

SensorAwareViewExample.js

Lines changed: 13 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,18 @@ function SensorView(props) {
1616
)
1717
}
1818

19-
const SensorDisplay = ({ value, name }) => (
20-
<Text style={styles.welcome}>{name}: {value}</Text>
21-
);
19+
const SensorDisplay = ({
20+
value: {
21+
x = 0,
22+
y = 0,
23+
z = 0,
24+
} = {},
25+
name,
26+
}) => {
27+
return (
28+
<Text style={styles.welcome}>{name}: {x} / {y} / {z}</Text>
29+
)
30+
};
2231

2332
class SensorsDisplay extends Component {
2433
render() {
@@ -28,7 +37,7 @@ class SensorsDisplay extends Component {
2837
Magnetometer,
2938
} = this.props;
3039

31-
debugger;
40+
// console.debug(this.props);
3241

3342
return (
3443
<View style={styles.container}>

0 commit comments

Comments
 (0)