From 2a4c7eef18ae56ec6637a0070f5db7b2a448d54a Mon Sep 17 00:00:00 2001 From: Arnaud Lyard Date: Sat, 8 Nov 2025 09:15:45 +0100 Subject: [PATCH] docs: update README after upgrading to SDK 54 to remove deprecated readAsStringAsync method --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index e7e6f3c..6020217 100644 --- a/README.md +++ b/README.md @@ -89,7 +89,7 @@ export default App; import React, { useEffect, useState } from 'react'; import { ActivityIndicator, Alert } from 'react-native'; import { Asset } from "expo-asset"; -import * as FileSystem from "expo-file-system"; +import { File } from 'expo-file-system/next'; import { LatLng, LeafletView } from 'react-native-leaflet-view'; const DEFAULT_LOCATION = { @@ -106,7 +106,7 @@ const App: React.FC = () => { const path = require("./assets/leaflet.html"); const asset = Asset.fromModule(path); await asset.downloadAsync(); - const htmlContent = await FileSystem.readAsStringAsync(asset.localUri!); + const htmlContent = await new File(asset.localUri!).text(); if (isMounted) { setWebViewContent(htmlContent);