Skip to content

"foo" in useParams() always evaluates to false #519

Open
@samualtnorman

Description

@samualtnorman

Describe the bug

"foo" in useParams() // always evaluates to false
"foo" in { ...useParams() } // can evaluate to true or false

I assume this has something to do with useParams() returning a Proxy

Your Example Website or App

https://github.com/samualtnorman/solid-bug/tree/useparams

Steps to Reproduce the Bug or Issue

  1. Clone repo
  2. Switch to useparams branch
  3. pnpm install
  4. pnpm dev
  5. Visit http://localhost:3000/ids/0

Expected behavior

I expect it to evaluate to true when that param is present

Screenshots or Videos

No response

Platform

  • OS: NixOS 24.11 (Vicuna) x86_64
  • Browser: Zen Browser 1.8.2b (Firefox 135.0.1) (64-bit)

Additional context

I initially thought this might have been an issue with Proxys in general in Solid.js but I was only able to replicate the issue with useParams()

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions