2.4.1 • Published 4 years ago

@fenderdigital/react-session-activity v2.4.1

Weekly downloads
46
License
UNLICENSED
Repository
-
Last release
4 years ago

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 with
  • createdAt - time session starts
  • children - renders any child elements
  • duration - session duration in seconds
  • expiresAt - time session expires
  • lengthOfSession - the length of a session in mins
  • onExpired - callback for when the session expires, with current state
  • onPlaying - callback for when the session is running, with current state
  • onStart - callback for when the session is running, with current state
  • onUpdate - callback for when the session updates, with current state
  • sessionId - uuid for a given session
  • timezone - users timezone
  • updatedAt - time session was updated
propNamepropTypedefaultValueisRequired
activityobjectnull-
createdAtstringnone-
childrennodenone-
durationnumbernone-
expiresAtstringnone-
lengthOfSessionnumber30-
onExpiredfunc() => {}-
onPlayingfunc() => {}-
onStartfunc() => {}-
onUpdatefunc() => {}-
sessionIdstringnone-
timezonestringnone-
updatedAtstringnone-

Development

Check the Monorepo README for development documentation.

2.4.1

4 years ago

2.4.0

5 years ago

2.3.0

5 years ago

2.2.0

5 years ago

2.1.0

5 years ago

2.0.0

5 years ago

1.0.0

5 years ago