Skip to content

useTagged 0.1.0 view source

function useTagged(
  scope: Fusion.Scope,
  tag: Fusion.UsedAs<string>
): Fusion.StateObject<{ Instance }>

Returns a state object with every instance of a given tag. Updates when new instances get tagged or old instances get untagged.


Parameters

scope : Fusion.Scope

The scope to store cleanup tasks.

tag : Fusion.UsedAs<string>

The CollectionService tag to track.


Returns -> Fusion.StateObject<{ Instance }>

A state object with every instance of the given tag.


Example Usage

-- TODO: write example