@sensenet/hooks-react
TypeScript icon, indicating that this package has built-in type declarations

1.6.3 • Public • Published

@sensenet/hooks-react

sensenet related logic as React hooks for reusability.

NPM version NPM downloads License: GPL v2

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

Package Sidebar

Install

npm i @sensenet/hooks-react

Homepage

sensenet.com

Weekly Downloads

1

Version

1.6.3

License

GPL-2.0

Unpacked Size

1.62 MB

Total Files

141

Last publish

Collaborators

  • hassanad
  • kubehu
  • herflis
  • tusmester
  • kavics
  • vargajoe