Skip to content

Commit

Permalink
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packages/mobx-react-lite/README.md
Original file line number Diff line number Diff line change
@@ -89,7 +89,7 @@ function Measurement({ unit }) {
get lengthWithUnit() {
// lengthWithUnit can only depend on observables, hence the above conversion with `useAsObservableSource`
return observableProps.unit === "inch"
? `${this.length * 2.54} inch`
? `${this.length / 2.54} inch`
: `${this.length} cm`
}
}))
@@ -104,7 +104,7 @@ function Measurement({ unit }) {
length: 0,
get lengthWithUnit() {
// lengthWithUnit can only depend on observables, hence the above conversion with `useAsObservableSource`
return this.unit === "inch" ? `${this.length * 2.54} inch` : `${this.length} cm`
return this.unit === "inch" ? `${this.length / 2.54} inch` : `${this.length} cm`
}
}))

0 comments on commit 28e080e

Please sign in to comment.