Update a Client with Real-time Data
stock_change will include the
item ID, and the new stock level.
ProductChannel will be modified to define the new broadcast function. This function will broadcast if the stock level changed, or skip the broadcast if it’s identical. This prevents unnecessary data from being sent to connected clients.
Add the stock level change function to the