diff --git a/README.md b/README.md index f49de871..b70ff340 100644 --- a/README.md +++ b/README.md @@ -23,8 +23,8 @@ yarn add @react-native-community/hooks - [useAccessibilityInfo](https://github.com/react-native-community/hooks#useaccessibilityinfo) - [useAppState](https://github.com/react-native-community/hooks#useappstate) - [useBackHandler](https://github.com/react-native-community/hooks#usebackhandler) -- [useCameraRoll](https://github.com/react-native-community/hooks#usecameraroll) -- [useClipboard](https://github.com/react-native-community/hooks#useclipboard) +- ~~[useCameraRoll](https://github.com/react-native-community/hooks#usecameraroll)~~ +- ~~[useClipboard](https://github.com/react-native-community/hooks#useclipboard)~~ - [useDimensions](https://github.com/react-native-community/hooks#usedimensions) - [useImageDimensions](https://github.com/react-native-community/hooks#useImageDimensions) - [useKeyboard](https://github.com/react-native-community/hooks#usekeyboard) @@ -74,6 +74,8 @@ useBackHandler(() => { ### `useCameraRoll` +**Deprecated**. Please use `useCameraRoll()` from [`@react-native-camera-roll/camera-roll`](https://github.com/react-native-cameraroll/react-native-cameraroll#usecameraroll) + ```js import { useCameraRoll } from '@react-native-community/hooks' @@ -88,6 +90,8 @@ const [photos, getPhotos, saveToCameraRoll] = useCameraRoll() ### `useClipboard` +**Deprecated**. Please use `useClipboard()` from [`@react-native-clipboard/clipboard`](https://github.com/react-native-clipboard/clipboard#useclipboard) + ```js import { useClipboard } from '@react-native-community/hooks' diff --git a/src/useCameraRoll.ts b/src/useCameraRoll.ts index acb3d616..83919b58 100644 --- a/src/useCameraRoll.ts +++ b/src/useCameraRoll.ts @@ -15,6 +15,10 @@ const defaultConfig: GetPhotosParamType = { groupTypes: 'All', } +/** + * @deprecated Please use "useCameraRoll" from "@react-native-camera-roll/camera-roll" instead + * More: https://github.com/react-native-cameraroll/react-native-cameraroll#usecameraroll + */ export function useCameraRoll() { const [photos, setPhotos] = useState(initialState) diff --git a/src/useClipboard.ts b/src/useClipboard.ts index 9a291b7b..d80c225d 100644 --- a/src/useClipboard.ts +++ b/src/useClipboard.ts @@ -9,6 +9,10 @@ function setString(content: string) { listeners.forEach((listener) => listener(content)) } +/** + * @deprecated Please use "useClipboard" from "@react-native-clipboard/clipboard" instead + * More: https://github.com/react-native-clipboard/clipboard#useclipboard + */ export function useClipboard(): [string, (content: string) => void] { const [data, updateClipboardData] = useState('')