raquo / Waypoint

Efficient router for Laminar UI Library
MIT License
92 stars 11 forks source link

Add warning for Scala 3 #12

Closed ioleo closed 1 year ago

raquo commented 1 year ago

Hey, thanks for reporting the issue in Discord! Turns out it was a legit bug, and I've fixed it now.

I don't use ClassTag in collectStatic anymore, just a simple == comparison to the provided page value. Interestingly, Waypoint docs already say that this is how collectStatic should have worked in the first place, so the ClassTag implementation was actually a bug.

This should take care of Scala 3 enums. collectSignal still uses ClassTag, but I don't think it's subject to the same pitfall with Scala 3 enums, because to use collectSignal you need to explicitly provide the type that you want to match (unlike collectStatic where you provide the value, and the (incorrect) type was inferred).

So, with this fix, I don't think the docs need such a warning.