ITADN

Box rows incompatible with streams

#144Closedtrentjones21 创建于 2023-10-22
T
trentjones21commented
Perhaps this is outside the scope of this library, but I don't see any similar issues so I thought I'd at least start a discussion. It would be really nice if rows were compatible with streams. Currently this code: ```heex <.box> <:row :for={{dom_id, message} <- @streams.messages}> <!-- ... --> </:row> </.box ``` errors with the following message: ``` streams can only be consumed directly by a for comprehension. If you are attempting to consume the stream ahead of time, such as with `Enum.with_index(@stream.messages)`, you need to place the relevant information within the stream items instead. ``` Is natively iterating over streams something this library is interested in handling? I can look at creating a PR when I have some time, but only if that's the direction this library would want to take.
关闭于 2024-09-07 2 条评论