Follow Me Mode
Customize Behavior
flockMode
- To enable
Follow Me
Mode, set theflockMode
attribute totrue
. - This will enable
Follow Me mode
as an option for yourUsers
globally, wherever Presence is shown. - To start the shared flock session, click on a
User's
avatar to start following them. - Learn more about it in the Flock Mode feature section.
Using API:
onNavigate
- Use a callback for custom navigation or side-effects.
- When the leader of a
Follow Me
session navigates, we can use the React Router to update the follower’s position. In the callback you will receive aPageInfo
object.
defaultFlockNavigation
- Disable default
Follow Me
navigation. - Our default navigation uses window.location.href to detect navigation. If you are handling navigation using the callback method above, you should disable our default navigation.
- Default:
true
startFollowingUser()
- Start following a user by passing in their user ID.
stopFollowingUser()
- Stop following a user.
- If the current user is in a
Follow Me
session, they will be removed from that session. If there are no more followers in the session, the session will be destroyed.