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

MergeProps in RouteDefinitions data result in Proxy error #6

Closed
TheFedaikin opened this issue Mar 3, 2021 · 5 comments
Closed

MergeProps in RouteDefinitions data result in Proxy error #6

TheFedaikin opened this issue Mar 3, 2021 · 5 comments
Labels
bug Something isn't working

Comments

@TheFedaikin
Copy link

TheFedaikin commented Mar 3, 2021

Good day, library maintainers!

I was playing around with this router (and solid in general) and wanted to say thank you for this awesome library, and ecosystem you are working on. This is a breath of fresh air and I am definitely looking forward to incorporate Solid into my work!

I looked into the source code for this router and found out how to use data object. But I found out that if you are using mergeProps in the data property in route definitions it's breaking with Proxy error, but if I just return new object (without mergeProps) it's working as intended.

I am not sure it's a solid-app-router bug or bug in the main library, but I didn't encounter this before, while using solid without this router.

Error:
'ownKeys' on proxy: trap result did not include 'Symbol(state-proxy)'

Repro link

I might've misunderstood something with mergeProps so it might not be a bug at all.

@ryansolid
Copy link
Member

Interesting. This is likely a bug in the mergeProps helper. It looks like it is expecting different handling of internal symbols. Thanks for the reproduction this should be easier to track down the right solution.

@ryansolid ryansolid added the bug Something isn't working label Mar 3, 2021
@ryansolid
Copy link
Member

I am still looking at this. I do have a fix that works. But this whole thing makes me think I'm missing something important in my understanding so I'm taking my time to make sure I get this right before I release it.

@ryansolid
Copy link
Member

ryansolid commented Mar 10, 2021

I found the underlying issue: Proxies trying to wrap each other. The fix ended up be way simpler (one liner). This will be fixed in the next version of Solid.

@TheFedaikin
Copy link
Author

Thanks for the update! Looking forward to the next version!

@ryansolid
Copy link
Member

Ok fixed in solid v0.24.14

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants