Skip to content

Commit 6b662aa

Browse files
chore(yfa-react): Use PHOTO_STORAGE constant (ionic-team#1393)
In the loadSaved() method we can use the PHOTO_STORAGE constant already declared, instead of the 'photos' string.
1 parent e0b59b5 commit 6b662aa

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

‎src/pages/react/your-first-app/4-loading-photos.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ With the photo array data saved, we will create a method that will retrieve the
4343
```typescript
4444
useEffect(() => {
4545
const loadSaved = async () => {
46-
const photosString = await get('photos');
46+
const photosString = await get(PHOTO_STORAGE);
4747
const photos = (photosString ? JSON.parse(photosString) : []) as Photo[];
4848
for (let photo of photos) {
4949
const file = await readFile({

0 commit comments

Comments
 (0)