components-js
components-js copied to clipboard
context refactor
Out of 52 publicly exposed hooks, 17 are related to context handling in some way. They clutter up our docs a bit and seem more important than they really are. I think we can combine most of the functionality and reduce them to 5:
useLayoutContext
useMaybeLayoutContext
useEnsureLayoutContext
3 -> 1
useCreateLayoutContext
useEnsureCreateLayoutContext
2 -> 1
useRoomContext
useMaybeRoomContext
useEnsureRoom
3 -> 1
useParticipantContext
useEnsureParticipant
useMaybeParticipantContext
3 -> 1
useTrackRefContext
useEnsureTrackRef
useMaybeTrackRefContext
3 -> 1
useTrackContext
useEnsureTrackReference
useMaybeTrackContext
3 -> 0 // after deprecated and removed