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

Add ability to register actions dynamically #7

Closed
timc1 opened this issue Sep 10, 2021 · 0 comments · Fixed by #8
Closed

Add ability to register actions dynamically #7

timc1 opened this issue Sep 10, 2021 · 0 comments · Fixed by #8

Comments

@timc1
Copy link
Owner

timc1 commented Sep 10, 2021

Currently actions must be registered up front – though this works well for static actions; e.g. navigating pages, triggering DOM events, it falls short of easily enabling users to generate actions on the fly.

Perhaps an API like so:

const { registerActions } = useKBar(() => {...});

React.useEffect(() => {
  registerActions([
    // ...
  ])
}, [])
This was referenced Sep 10, 2021
@timc1 timc1 closed this as completed in #8 Sep 11, 2021
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

Successfully merging a pull request may close this issue.

1 participant