Overview
useFetchUser returns a function that fetches a user’s public profile by their Sublay user ID. Use this when you have the user’s id and need to load their profile on demand.
Usage Example
Parameters
The hook returns a function. That function accepts:The Sublay user ID to fetch.
Optional. Pass
"files" to populate avatarFile and bannerFile with full File objects.Optional. Resolves the returned user’s reputation into a
spaceReputation number. Accepts a space <uuid> or "none" (project-general bucket) only — "context" is rejected with a 400 on this endpoint. Empty string, "general", and null are also rejected. See Reputation.Optional. When
true, spaceReputation is the subtree sum (the space plus all its descendants). Only honored when spaceReputationId is an explicit <uuid>.Returns
The user’s public profile. When
spaceReputationId is set, it carries an added spaceReputation number. See User data model and Reputation.
