---
title: "PSPDFKit 2.9 migration guide"
canonical_url: "https://www.nutrient.io/guides/react-native/migration-guides/react-native-2-9-migration-guide/"
md_url: "https://www.nutrient.io/guides/react-native/migration-guides/react-native-2-9-migration-guide.md"
last_updated: "2026-05-19T18:11:33.983Z"
description: "Learn how to update your React Native app to PSPDFKit 2.9 by using the new MeasurementValueConfiguration for accurate measurement settings."
---

This guide covers migrating to PSPDFKit 2.9 for React Native, after a new way was introduced to configure measurements using the [`MeasurementValueConfiguration`](https://www.nutrient.io/api/react-native/Measurements.html#.MeasurementValueConfiguration) object as part of the [`PSPDFKitView`](https://www.nutrient.io/api/react-native/NutrientView.html) component. This configuration object replaces the old `setMeasurementScale` and `setMeasurementPrecision` APIs, which have now been removed.

If you were using the `setMeasurementScale` and `setMeasurementPrecision` APIs to set your measurements configuration, this needs to be updated.

For example, this is the old way of setting it:

```typescript

this.pdfRef.current?.setMeasurementScale({
	unitFrom: 'mm',
	valueFrom: 1.0,
	unitTo: 'mi',
	valueTo: 10.0,
});

this.pdfRef.current?.setMeasurementPrecision('fourDP');

```

You now need to set above configuration the following way:

```typescript

const scale: MeasurementScale = {
	unitFrom: Measurements.ScaleUnitFrom.MM,
	valueFrom: 1.0,
	unitTo: Measurements.ScaleUnitTo.MI,
	valueTo: 10.0,
};

const measurementValueConfig: MeasurementValueConfiguration = {
	name: 'Custom Scale',
	scale: scale,
	precision: Measurements.Precision.FOUR_DP,
	isSelected: true,
};

const configs = [measurementValueConfig];
await this.pdfRef.current?.setMeasurementValueConfigurations(configs);

```

The [`MeasurementValueConfiguration`](https://www.nutrient.io/api/react-native/Measurements.html#.MeasurementValueConfiguration) object can also be passed in as part of the [`Configuration`](https://www.nutrient.io/api/react-native/PDFConfiguration.html) when creating the [`PSPDFKitView`](https://www.nutrient.io/api/react-native/NutrientView.html) component:

```typescript

<PSPDFKitView
	ref={this.pdfRef}
	document={measurementsDocument}
	configuration={{
		iOSBackgroundColor: processColor('lightgrey'),
		pageMode: 'single',
		measurementValueConfigurations: [
			{
				name: 'Custom Scale',
				scale: {
					unitFrom: Measurements.ScaleUnitFrom.INCH,
					valueFrom: 1.0,
					unitTo: Measurements.ScaleUnitTo.CM,
					valueTo: 3.0,
				},
				precision: Measurements.Precision.TWO_DP,
			},
		],
	}}
	fragmentTag="PDF1"
	style={styles.pdfColor}
/>

```

For more information, refer to the [PSPDFKit 2.9 for React Native changelog](https://www.nutrient.io/guides/react-native/changelog.md#2.9).
---

## Related pages

- [React Native 2 12 Migration Guide](/guides/react-native/migration-guides/react-native-2-12-migration-guide.md)
- [React Native 2 13 Migration Guide](/guides/react-native/migration-guides/react-native-2-13-migration-guide.md)
- [React Native 2 16 Migration Guide](/guides/react-native/migration-guides/react-native-2-16-migration-guide.md)
- [React Native 2 2 Migration Guide](/guides/react-native/migration-guides/react-native-2-2-migration-guide.md)
- [React Native 2 3 Migration Guide](/guides/react-native/migration-guides/react-native-2-3-migration-guide.md)
- [React Native 2 8 Migration Guide](/guides/react-native/migration-guides/react-native-2-8-migration-guide.md)
- [React Native 4 Migration Guide](/guides/react-native/migration-guides/react-native-4-migration-guide.md)
- [How to upgrade to the latest React Native version](/guides/react-native/migration-guides/upgrading.md)
- [React Native 3 Migration Guide](/guides/react-native/migration-guides/react-native-3-migration-guide.md)

