I usually keep a set of item ids that are expanded. Keeping the expanded state directly in the item is ok as long as you don't lose it while the item leaves and rejoins the composition.
Hoisting has a few more advantages like not querying all the items to know which are expanded if you need that information in the future.