-
-
Notifications
You must be signed in to change notification settings - Fork 690
This issue was moved to a discussion.
You can continue the conversation there. Go to discussion →
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
leptos
in the wild
#2359
Comments
Hi everyone, Here are a few extension traits we use internally which might be of general-ish interest.
|
This issue was moved to a discussion.
You can continue the conversation there. Go to discussion →
Hi everyone!
We recently ported our codebase from
sycamore
toleptos
. It's still pretty early, but things have been working well.:D
I just wanted to drop in to share some things we have tweaked and/or extended in case there is interest in how things are being used in the wild and maybe upstreaming some of the more widely-applicable changes.
Our more relevant changes:
Avoid swallowing errors from event handlers. fix: re-throw errors in delegated event listeners #2382
We added an assertion to avoid delegated event handlers silently overwriting each other. fix: prevent setting the same event listener twice #2383
Signals not printing their values made debugging tricky, so we added that. The added bound didn't cause any issues for us. feat: print inner value in
Debug
impls #2384We changed
PartialEq
to compare by value.The reasoning:
sycamore
and we wanted to reduce the diff during the port. I don't think this ended up mattering much.BTreeMap
would be subscribing to unpredictable subsets of the signals inside without that being obvious.Hash
was also changed to match Giovanni-Tably@f658d6a)Exporting
ReactiveSystemError
. It was already public, just unreachable and I wanted to handle the case where an owner has been disposed of manually (to print debug warnings). Giovanni-Tably@ae31550Exposing direct access to raw
Text
nodes for some thorny ContentEditable logic. Giovanni-Tably@b4859e1A few more are visible in our fork here: Giovanni-Tably#2.
Some context:
leptos
's SSR.RwSignal
andSignal
in interfaces. Have been toying with adding a r/w equivalent ofSignal
to avoid using effects for double binding.ReactiveMerge
, which is similar to aStore
but not quite if I understand correctly. I'll write something up if there is interest, but it's essentially a way to easily manage nested signals which is useful and ergonomic for routing and other data that closely matches the render tree.Hope this is helpful!
I am happy to elaborate and open PRs to upstream anything you think makes sense.
All in all, we have been very happy with the transition, so thank you for pushing the envelope of what Rust in the FE can do!
The text was updated successfully, but these errors were encountered: