diff --git a/README.md b/README.md index 3d3e6bf..35948df 100644 --- a/README.md +++ b/README.md @@ -22,5 +22,32 @@ directory. Anzol is built alongside automated tests to ensure quality. ## Currently Available Hooks -- useFetch: fetch data without showing stale responses and write easy to understand code that communicates intention -- useDefer: delay the update of a value until that value has stopped changing for a chosen amount of time \ No newline at end of file +- useFetch: Fetches data without showing stale responses and allows writing easy-to-understand code that +- communicates intention. +- useDefer: Delays the update of a value until that value has stopped changing for a chosen amount of time. + +## Installation +Anzol is available on the NPM registry. To install it, just run: +```bash +npm install anzol +``` + +## Planned features +These features are not yet implement but we plan to do so in the foreseeable future. Feel free to make your own +suggestions. +- useFirstRender: Returns true on the first render and false otherwise. +- useClickOutside: Takes a reference to an HTML element and a callback function, and calls that function when the +- user clicks anywhere outside the given element. +- useLocalStorage: Provides access to local storage, with the additional option to update all usages of this hook +- when local storage changes. +- useEvent: Encapsulates the code needed to correctly listen to events in React, including event listener +- cleanup. +- useInView: Takes a reference to an HTML element and returns whether that element's bounding client rectangle is +- currently in view. You can choose if this hook tests for an element being completely or only partially in view. +- usePreferredScheme: Listens for changes in the user's preferred scheme and returns it. +- useDarkMode: Similar to usePreferredScheme but allows setting the user scheme manually and automatically +- updates it when the preferred scheme changes. Uses local storage to save the chosen scheme across reloads. +- useLazyLoad: Takes a batch size and a max element count, and provides a function to add elements. Allows you to +- pass in a callback function to transform elements. The hook keeps track of the elements and returns a transformed list +- of all elements, as well as a flag indicating whether the end of content was reached. This flag will be set to true +- when the given max element count is reached or an added batch is shorter than the batch size. \ No newline at end of file