Small state utility for helping reduce the number of imports
when working with resources in isolation.
The return value is an instance of a class with a single
@tracked property, current. If current is a boolean,
there is a toggle method available as well.
Small state utility for helping reduce the number of imports when working with resources in isolation.
The return value is an instance of a class with a single
@tracked
property,current
. Ifcurrent
is a boolean, there is atoggle
method available as well.For example, a Clock: