Skip to content
Branch: master
Find file History
Pull request Compare This branch is 5 commits behind develop.
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
..
Failed to load latest commit information.
src
test
.gitignore
LICENSE
README.md
jest.config.js
package.json
tsconfig.json
tsconfig.test.json

README.md

@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
You can’t perform that action at this time.