Skip to content

Commit 52f3519

Browse files
committed
docs(react): use slice
1 parent 360a5da commit 52f3519

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

docs/react/your-first-app/7-live-reload.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ export function usePhotoGallery() {
5959
Preferences.set({ key: PHOTO_STORAGE, value: JSON.stringify(newPhotos) });
6060

6161
// Delete photo file from filesystem
62-
const filename = photo.filepath.substr(photo.filepath.lastIndexOf('/') + 1);
62+
const filename = photo.filepath.slice(photo.filepath.lastIndexOf('/') + 1);
6363
await Filesystem.deleteFile({
6464
path: filename,
6565
directory: Directory.Data,

versioned_docs/version-v7/react/your-first-app/7-live-reload.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ export function usePhotoGallery() {
5959
Preferences.set({ key: PHOTO_STORAGE, value: JSON.stringify(newPhotos) });
6060

6161
// Delete photo file from filesystem
62-
const filename = photo.filepath.substr(photo.filepath.lastIndexOf('/') + 1);
62+
const filename = photo.filepath.slice(photo.filepath.lastIndexOf('/') + 1);
6363
await Filesystem.deleteFile({
6464
path: filename,
6565
directory: Directory.Data,

0 commit comments

Comments
 (0)