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

Using reaflow with valtio #197

Open
cqh963852 opened this issue Jan 6, 2023 · 0 comments
Open

Using reaflow with valtio #197

cqh963852 opened this issue Jan 6, 2023 · 0 comments

Comments

@cqh963852
Copy link

cqh963852 commented Jan 6, 2023

I'm submitting a...


[ ] Regression (a behavior that used to work and stopped working in a new release)
[ ] Bug report  
[ ] Performance issue
[x] Feature request
[ ] Documentation issue or request
[ ] Other... Please describe:

I am using valtio as my state manager.

valtio allow mutate data through es6 proxy.

Current behavior

image

image

The onClick handler's node param is not the origin value.

So I can't mutate the value, and make the valtio work.

Expected behavior

Make the handler's node param same as input.

Make properties not use Spread syntax

image
image

What is the motivation / use case for changing the behavior?

If the node object is not the same as input.

I can't set the node value from eventhandler.


The alternative is find node from nodesProxy, then change it.

But if I can change the node in event handler that would be more convenient.

@cqh963852 cqh963852 changed the title Using valtio with reaflow Using reaflow with valtio Jan 6, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant