@sensenet/hooks-react
v1.6.3
Published
> sensenet related logic as React hooks for reusability.
Downloads
40
Readme
@sensenet/hooks-react
sensenet related logic as React hooks for reusability.
Install
# Yarn
yarn add @sensenet/hooks-react
# NPM
npm install @sensenet/hooks-react
Usage
You can use the custom hooks in a similar way as the build-in React hooks, respecting the Rules of Hooks.
Custom contexts and Providers
- CurrentAncestors and CurrentAncestorsProvider
- CurrentChildren and CurrentChildrenProvider
- CurrentContent and CurrentContentProvider
- InjectorContext
- LoadSettingsContext and LoadSettingsContextProvider
- LoggerContext and LoggerContextProvider
- RepositoryContext
- SessionContext and SessionContextProvider
Custom hooks
- useDownload
- useInjector
- useLogger
- useRepositoryEvents
- useRepository
- useSession
- useVersionInfo
- useWopi