The previous solution of using an incrementing integer would result in collisions between items stored in state and beams, since beam IDs are generated on the fly and not stored in state, and the unique ID was only incremented when the ID was not stored in state. This makes item IDs a little harder to read, but ensure they remain unique across all items.
The previous solution of using an incrementing integer would result in collisions between items stored in state and beams, since beam IDs are generated on the fly and not stored in state, and the unique ID was only incremented when the ID was not stored in state. This makes item IDs a little harder to read, but ensure they remain unique across all items.