@fenderdigital/react-session-activity
v2.4.1
Published
Fender React UI Kit SessionActivity Component
Downloads
3
Readme
SessionActivity for Fender React UI Kit
Description
It monitors a user's session. The session ends if no activity occurs between the create and expire dates. The session expire increases, if any user activity is detected.
Installation and Usage
yarn add @fenderdigital/react-session-activity --save
import SessionActivity from '@fenderdigital/react-session-activity';
Props
activity
- stores user activity in an object to update the session withcreatedAt
- time session startschildren
- renders any child elementsduration
- session duration in secondsexpiresAt
- time session expireslengthOfSession
- the length of a session in minsonExpired
- callback for when the session expires, with current stateonPlaying
- callback for when the session is running, with current stateonStart
- callback for when the session is running, with current stateonUpdate
- callback for when the session updates, with current statesessionId
- uuid for a given sessiontimezone
- users timezoneupdatedAt
- time session was updated
| propName | propType | defaultValue | isRequired | | --------------- | -------- | ------------ | ---------- | | activity | object | null | - | | createdAt | string | none | - | | children | node | none | - | | duration | number | none | - | | expiresAt | string | none | - | | lengthOfSession | number | 30 | - | | onExpired | func | () => {} | - | | onPlaying | func | () => {} | - | | onStart | func | () => {} | - | | onUpdate | func | () => {} | - | | sessionId | string | none | - | | timezone | string | none | - | | updatedAt | string | none | - |
Development
Check the Monorepo README for development documentation.