Samuel
what part? we need a function that does 2 things 1. filter out deleted messages 2. provide the next message, for the UI to use I'm curious what you'd do differently
2 2
Samuel
oh right haha so what, return null or something and then filter out afterwards?
1
Samuel
Performance is not an issue here and reduce is wildly more unreadable and bug prone. Avoid reduce where possible imo unless you have a specific need
chelsea bridge
> Or use a normal loop. i was waiting for someone to say that you don't have a function that needs to do two things, you have two distinct problems to solve and a stack of code that hides bugs and performance issues
1 8
Samuel
That is the correct criticism yep. would’ve sidestepped this bug completely
1 2