useItemCount
useItemCount(
item):number
How many of item the player’s bag holds, across every stack and
whatever each copy’s data, as countItem counts them in a system: a
HUD’s key count,
<Counter icon="key" label="Keys" value={useItemCount("key")} />. It
re-renders only when the count changes.
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
item |
string |
Returns
Section titled “Returns”number