From c8f5ed9d52d36b59d2c6a49b9aa785b74e51db54 Mon Sep 17 00:00:00 2001 From: Max Date: Sat, 17 Apr 2021 20:24:12 +0200 Subject: [PATCH 1/3] Fix typos --- README.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index ddf4c73..091b923 100644 --- a/README.md +++ b/README.md @@ -31,10 +31,10 @@ const [value, setValue] = useStorage('mykey'); While Capacitor allows you to write to one API across several platforms, not all features are supported on all platforms. It is encouraged to check if the feature you intend to use is available before using it to avoid any runtime errors. -Each of the hook plugin paths exports an `availableFeatures` object, which contains a list features for that plugin. If the feature is supported for the current platform the app is running on, that feature will be true.: +Each of the hook plugin paths exports an `availableFeatures` object, which contains a list features for that plugin. If the feature is supported for the current platform the app is running on, that feature will be true: ```jsx -const { useStorageItem, availableFeatures } = `@capacitor-community/react-hooks/storage`; +const { useStorage, availableFeatures } = `@capacitor-community/react-hooks/storage`; const [value, setValue] = useStorage('mykey'); ... if(availableFeatures.useStorage) { @@ -151,7 +151,7 @@ import { useClipboard, availableFeatures } from '@capacitor-community/react-hook const { value, getValue, setValue } = useClipboard(); const paste = useCallback(async () => { - await setValue('http://ionicframework.com/); + await setValue('http://ionicframework.com/'); }, [setValue]); const copy = useCallback(async () => { @@ -184,7 +184,7 @@ import: import { useFilesystem, base64FromPath, availableFeatures } from '@capacitor-community/react-hooks/filesystem'; ``` -`useFilesystem` returns back common methods to gain access to file system apis. +`useFilesystem` returns back common methods to gain access to file system APIs. ```jsx const { readFile } = useFilesystem(); From 4f22313bb121052cea890231d30f8aa98dfad892 Mon Sep 17 00:00:00 2001 From: Max Date: Sat, 17 Apr 2021 20:27:20 +0200 Subject: [PATCH 2/3] Revert useStorage change --- README.md | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/README.md b/README.md index 091b923..3a41275 100644 --- a/README.md +++ b/README.md @@ -34,7 +34,7 @@ While Capacitor allows you to write to one API across several platforms, not all Each of the hook plugin paths exports an `availableFeatures` object, which contains a list features for that plugin. If the feature is supported for the current platform the app is running on, that feature will be true: ```jsx -const { useStorage, availableFeatures } = `@capacitor-community/react-hooks/storage`; +const { useStorageItem, availableFeatures } = `@capacitor-community/react-hooks/storage`; const [value, setValue] = useStorage('mykey'); ... if(availableFeatures.useStorage) { @@ -313,4 +313,3 @@ const updateName = useCallback((n) => { ``` `useStorageItem` will use the initial value already in storage, or the one provided if there is no existing value. - From b3f800ae1427ed2771f70afc03243fa1cd85d19d Mon Sep 17 00:00:00 2001 From: Max Date: Sat, 17 Apr 2021 20:28:13 +0200 Subject: [PATCH 3/3] Revert deleting newline