19:07 | <snek> | I just realized you can't use r&t for react deps arrays cuz you can't have objects in them |
19:07 | <snek> | so annoying |
19:08 | <littledan> | well... the symbol-as-weakmap-key with a sidetable could be a way through |
19:08 | <littledan> | (and not all deps arrays have objects) |
19:10 | <snek> | I'm just tired of every fun idea I have for r&t coming with sadness about 30s later when I remember objects exist |
19:11 | <littledan> | well... we tried the Box thing but folks were against it... now I guess lots of people are against equality as well, which is another thing which would make them difficult for React deps arrays... |
19:12 | <littledan> | This blog post explores R&T for React deps arrays (but counts on the equality overloading) https://sebastienlorber.com/records-and-tuples-for-react |
20:30 | <ljharb> | as primitives you'd be able to pass them into react hooks dep arrays. as objects, react would have to update to support them |
20:31 | <ljharb> | i'm still not sure what the point is of them if they don't have value equality tbh |
20:37 | <littledan> | Well, React could go and make that update to support them; that's one option |
23:36 | <Ashley Claymore> | I just realized you can't use r&t for react deps arrays cuz you can't have objects in them |
23:39 | <Ashley Claymore> | Or is this about using them within react dep arrays, which I definitely see value in https://twitter.com/acutmore/status/1256539594092433409 |