Skip to content
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

Direct subcompose #33

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open

Conversation

DasLixou
Copy link
Contributor

Makes replacing Ref::map(cx.me(), |me| &me.content) with just &cx.me().content possible.

@DasLixou
Copy link
Contributor Author

DasLixou commented Nov 16, 2024

Warning

Oh wait this might not work as intended, because I skip the composing in Map...

It did work when I ran it though... unsure what I skip here

@matthunz
Copy link
Collaborator

I’m not sure if this is safe 🤔 currently the Ref exists to keep the pointer the same across re-composes, then Map will also use that same pointer.

So if a parent is re-composed, but its child isn’t, the child will remain under the same ptr.

Honestly I’m not 100% sure though, I’d love to start adding more advanced tests so we can start chipping away at these un-ergonomic parts (because this PR would be a huge improvement)

@matthunz matthunz force-pushed the main branch 2 times, most recently from 10b82d8 to 326e62c Compare November 18, 2024 08:27
@matthunz matthunz force-pushed the main branch 3 times, most recently from 72f2ae5 to 5ae0a51 Compare December 9, 2024 02:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants