TanStack / TanStack/hotkeys

Devtools Panel always requires props

Open
#82 3 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
TypeScript
Stars
719
Forks
47
Avg merge
5d 5h
Merged PRs (30d)
1

Description

TanStack Hotkeys version

0.7.0

Framework/Library version

React v.19.2.3

Describe the bug and the steps to reproduce it

I'm not sure if this is intentional or not, but currently the typing for the Hotkeys Devtools Panel (React, Preact, and Solid) requires that you pass in props. I just noticed this after doing an upgrade to the packages. These required props look to be ones required by TanStack Devtools.

https://github.com/TanStack/hotkeys/blob/5c6f939379064a8011856de0453f523f341f2b7c/packages/solid-hotkeys-devtools/src/SolidHotkeysDevtools.tsx#L3-L10

Right now, this means that if you want to use the panel, then you are always required to pass in these props.

import { HotkeysDevtoolsPanel } from '@tanstack/react-hotkeys-devtools'

export function App() {
  return <HotkeysDevtoolsPanel theme='dark' devtoolsOpen={false} />
}

This feels wrong.

Also, if I'm not mistaken, these props shouldn't be required since the initial state for the panel has fallback defaults, so perhaps this is something to be fixed upstream in TanStack Devtools or perhaps it has a specific implementation type for those creating their own Panels which isn't being used here.

Your Minimal, Reproducible Example - (Sandbox Highly Recommended)

https://stackblitz.com/edit/github-tc8bes9w?file=src%2Findex.tsx

Screenshots or Videos (Optional)

No response

Do you intend to try to help solve this bug with your own PR?

None

Terms & Code of Conduct
  • I agree to follow this project's Code of Conduct
  • I understand that if my bug cannot be reliable reproduced in a debuggable environment, it will probably not be fixed and this issue may even be closed.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with packages/solid-hotkeys-devtools/src/SolidHotkeysDevtools.tsx and compare the corresponding React, Preact, and Solid panel typings. Reproduce the usage shown in the issue and check whether the default panel state supplies these values; done means the panel can be used without explicitly passing props, with the affected package typings aligned.

Written by the indexing model from the issue text.

Assessment

Tech stack
react, typescript
Domain
devtools, frontend
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
48/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.